LazyStack

Publish PetStoreDev stack to AWS

6.1 Publish

In this step we will publish our stack to AWS.

  1. Create an s3 bucket - you only need to do this the first time you publish.
    aws s3api create-bucket --bucket PetStore --region us-east-1 --acl private
  2. CD into the solution folder (LazyStackTutorial\PetStore), and use AWS SAM CLI to deploy your stack to AWS.
    Windows:
    sam deploy -t .\Stacks\Dev\serverless.template --stack-name PetStoreDev --s3-bucket petstore --capabilities  CAPABILITY_NAMED_IAM
    MacOS/Linux:
    sam deploy -t ./Stacks/Dev/serverless.template --stack-name PetStoreDev --s3-bucket petstore --capabilities  CAPABILITY_NAMED_IAM
    The PetStoreDev stack is deployed to AWS.

6.2 Generate AwsSettings.json file

  1. CD into the solution folder (LazyStackTutorial\PetStore), and execute "lazystack settings".
    Windows:
    lazystack settings PetStoreDev .\Stacks\Dev\AwsSettings.json
    MacOS/Linux:
    lazystack settings PetStoreDev ./Stacks/Dev/AwsSettings.json
    An AwsSettings.json file is placed in the Stacks\Dev folder. This file contains the configuration settings necessary for client apps to use the PetStoreDev AWS Stack.

Step Summary

We published our stack to AWS, generated an AwsSettings.json file and can now use those resources.