-
Notifications
You must be signed in to change notification settings - Fork 16
/
deployment.sh
executable file
·26 lines (17 loc) · 1.03 KB
/
deployment.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
export STACK_NAME=excellexbot
export AWS_DEFAULT_REGION=us-east-1
export REGION=$AWS_DEFAULT_REGION
echo "Deploy $STACK_NAME stack at $REGION region"
sourcebucket=cyruswong-sam-repo
aws s3 mb s3://$sourcebucket --region $REGION
rm excellexbotpackage.yaml
sam package --template-file excellexbot.yaml --s3-bucket $sourcebucket --output-template-file excellexbotpackage.yaml
# aws cloudformation deploy --stack-name $STACK_NAME --template-file excellexbotpackage.yaml \
# --region $REGION --capabilities CAPABILITY_IAM \
# --parameter-overrides DynamodbAutoScaling=false
sam publish --template excellexbotpackage.yaml --region us-east-1
# uncomment the following if you want to deploy the codehook example project.
# rm codehookpackage.yaml
# sam package --template-file codehook.yaml --s3-bucket $sourcebucket --output-template-file codehookpackage.yaml
# aws cloudformation deploy --stack-name Codehook$STACK_NAME --template-file codehookpackage.yaml \
# --region $REGION --capabilities CAPABILITY_IAM