Skip to content

ethanwc/ourrecipes-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Builds the lambda binary in a Docker container and outputs the packaged zip file

docker-compose run --rm build

S3_BUCKET=ourrecipes

Choose any name you like for the CloudFormation stack

STACK_NAME=ourrecipes-api

Uploads the CloudFormation template and zipped binary to S3

aws cloudformation package --template-file template.yaml --output-template-file packaged.yaml --s3-bucket $S3_BUCKET

Deploys the CloudFormation stack

aws cloudformation deploy --template-file packaged.yaml --capabilities CAPABILITY_IAM --stack-name $STACK_NAME

Outputs the API Gateway URL that you can use to call your API

aws cloudformation describe-stacks --query "Stacks[0].Outputs" --stack-name $STACK_NAME

Total Script

S3_BUCKET=ourrecipes; STACK_NAME=ourrecipes-api; docker-compose run --rm build; aws cloudformation package --template-file template.yaml --output-template-file packaged.yaml --s3-bucket $S3_BUCKET; aws cloudformation deploy --template-file packaged.yaml --capabilities CAPABILITY_IAM --stack-name $STACK_NAME; aws cloudformation describe-stacks --query "Stacks[0].Outputs" --stack-name $STACK_NAME;

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages