Skip to content

Instantly share code, notes, and snippets.

@elliottmurray
Last active February 25, 2020 04:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elliottmurray/63a1216bae72720f5b1d5d036e323db5 to your computer and use it in GitHub Desktop.
Save elliottmurray/63a1216bae72720f5b1d5d036e323db5 to your computer and use it in GitHub Desktop.
#!/bin/sh
defaultBucket=<insert here>
STACK_NAME=$1
BUCKET_NAME=${2:-$defaultBucket}
echo "Packaging..."
sam package -t template.yaml --output-template-file packaged.yaml --s3-bucket $BUCKET_NAME > /dev/null 2>&1
echo "Deploying..."
sam deploy --template-file packaged.yaml --stack-name $STACK_NAME --capabilities CAPABILITY_NAMED_IAM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment