-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployComands.txt
49 lines (24 loc) · 2.61 KB
/
deployComands.txt
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
sam package --s3-bucket rboyd-workshop --template-file templates/template.yaml --output-template-file build/packaged.yaml --profile workshop \
&& aws cloudformation deploy --template-file build/packaged.yaml --stack-name petition-api --parameter-overrides STAGE=petition DOMAIN=rboyd.dev --capabilities CAPABILITY_IAM --profile workshop
## Building and deploying the macro
sam build --use-container -b ./build/ -t template.yaml \
&& sam package --s3-bucket rboyd-workshop --template-file build/template.yaml --output-template-file build/packaged.yaml --profile workshop\
&& aws cloudformation deploy --template-file build/packaged.yaml --stack-name api-macro --capabilities CAPABILITY_NAMED_IAM --profile workshop
aws cloudformation deploy --stack-name api-macro-test --template-file test.yaml --capabilities CAPABILITY_IAM --profile workshop
touch test_templates/named_queries_event.json \
&& echo "{\"region\": \"us-east-1\", \"accountId\": \"053954707544\", \"fragment\": " >> test_templates/named_queries_event.json \
&& cat test_templates/test.yaml | yq .Resources.GetMethod >> test_templates/named_queries_event.json \
&& echo "}" >> test_templates/named_queries_event.json
sam build --use-container -b ./build/ -t template.yaml \
&& sam local invoke -t ./build/template.yaml -e test_templates/test_event.json SimpleAPIMacroFunction
touch test_templates/dynamo_putitem_event.json \
&& echo "{\"region\": \"us-east-1\", \"accountId\": \"053954707544\", \"requestId\":\"999\",\"fragment\": " >> test_templates/dynamo_putitem_event.json \
&& cat test_templates/dynamo_db_test.yaml | yq .Resources.GetMethod >> test_templates/dynamo_putitem_event.json \
&& echo "}" >> test_templates/dynamo_putitem_event.json
sam build --use-container -b ./build/ -t template.yaml \
&& sam local invoke -t ./build/template.yaml -e test_templates/dynamo_putitem_event.json SimpleAPIMacroFunction
aws cloudformation deploy --stack-name api-macro-dynamodb-test --template-file test_templates/dynamo_db_test.yaml --capabilities CAPABILITY_IAM --profile workshop
aws cloudformation deploy --stack-name api-vpc-test --template-file test_templates/vpc_test.yaml --capabilities CAPABILITY_IAM --profile workshop
aws cloudformation deploy --stack-name api-mq-test --template-file test_templates/amazon_mq_test.yaml --capabilities CAPABILITY_IAM --profile workshop
aws cloudformation deploy --stack-name api-cfn-test --template-file test_templates/cloudformation_test.yaml --capabilities CAPABILITY_IAM --profile workshop
aws cloudformation deploy --stack-name api-kinesis-test --template-file test_templates/kinesis_test.yaml --capabilities CAPABILITY_IAM --profile workshop