### Get Sparta ```bash $> go get -u -v github.com/mweagle/Sparta $> cd $GOPATH/src/github.com/mweagle/Sparta Sparta$> go get -u -v ./... ```
### Get Sample App ```bash Sparta$> go get -u -v github.com/mweagle/SpartaHelloWorld Sparta$> cd $GOPATH/src/github.com/mweagle/SpartaHelloWorld SpartaHelloWorld$> ```
### Deploy Sample App ```bash SpartaHelloWorld$> go run main.go provision --s3Bucket MY_S3_BUCKET $ go run main.go provision --s3Bucket MY_S3_BUCKET INFO[0000] ════════════════════════════════════════════════ INFO[0000] ╔═╗┌─┐┌─┐┬─┐┌┬┐┌─┐ Version : 1.1.0 INFO[0000] ╚═╗├─┘├─┤├┬┘ │ ├─┤ SHA : 2380eb0 INFO[0000] ╚═╝┴ ┴ ┴┴└─ ┴ ┴ ┴ Go : go1.10 INFO[0000] ════════════════════════════════════════════════ INFO[0000] Service: MyHelloWorldStack-mweagle LinkFlags= Option=provision UTC="2018-02-23T06:25:47Z" INFO[0000] ════════════════════════════════════════════════ INFO[0000] Provisioning service BuildID=49e010fa0178a44eddab85e4f311c75d97ef6885 CodePipelineTrigger= InPlaceUpdates=false NOOP=false Tags= INFO[0000] Verifying IAM Lambda execution roles INFO[0000] IAM roles verified Count=1 INFO[0001] Checking S3 versioning Bucket=MY_S3_BUCKET VersioningEnabled=true INFO[0001] Checking S3 region Bucket=MY_S3_BUCKET Region=us-west-2 INFO[0001] Running `go generate` INFO[0001] Compiling binary Name=Sparta.lambda.amd64 INFO[0003] Creating code ZIP archive for upload TempName=./.sparta/MyHelloWorldStack_mweagle-code.zip INFO[0003] Lambda code archive size Size="14 MB" INFO[0003] Uploading local file to S3 Bucket=MY_S3_BUCKET Key=MyHelloWorldStack-mweagle/MyHelloWorldStack_mweagle-code.zip Path=./.sparta/MyHelloWorldStack_mweagle-code.zip Size="14 MB" INFO[0014] Uploading local file to S3 Bucket=MY_S3_BUCKET Key=MyHelloWorldStack-mweagle/MyHelloWorldStack_mweagle-cftemplate.json Path=./.sparta/MyHelloWorldStack_mweagle-cftemplate.json Size="2.3 kB" INFO[0015] Creating stack StackID="arn:aws:cloudformation:us-west-2:123412341234:stack/MyHelloWorldStack-mweagle/6b71c580-1862-11e8-a26e-503f20f2ad82" INFO[0047] CloudFormation provisioning metrics: INFO[0047] Operation duration Duration=29.00s Resource=MyHelloWorldStack-mweagle Type="AWS::CloudFormation::Stack" INFO[0047] Operation duration Duration=19.36s Resource=IAMRole8ac3388ca48db9dbd6fab6f9410bfef9d10b7b35 Type="AWS::IAM::Role" INFO[0047] Operation duration Duration=2.14s Resource=HelloWorldLambda7d01d27fe422d278bcc652b4a989528718eb88af Type="AWS::Lambda::Function" INFO[0047] Stack provisioned CreationTime="2018-02-23 06:26:02.395 +0000 UTC" StackId="arn:aws:cloudformation:us-west-2:123412341234:stack/MyHelloWorldStack-mweagle/6b71c580-1862-11e8-a26e-503f20f2ad82" StackName=MyHelloWorldStack-mweagle INFO[0047] ════════════════════════════════════════════════ INFO[0047] MyHelloWorldStack-mweagle Summary INFO[0047] ════════════════════════════════════════════════ INFO[0047] Verifying IAM roles Duration (s)=0 INFO[0047] Verifying AWS preconditions Duration (s)=1 INFO[0047] Creating code bundle Duration (s)=2 INFO[0047] Uploading code Duration (s)=11 INFO[0047] Ensuring CloudFormation stack Duration (s)=33 INFO[0047] Total elapsed time Duration (s)=47 ```
### Done ![AWS Console](/presentations/getting-started/AWS-console.jpg "AWS Console")
![Sparta Helmet](/images/SpartaHelmet.png "Sparta") More examples in [GitHub](https://github.com/mweagle?utf8=%E2%9C%93&tab=repositories&q=Sparta&type=&language=)