-
Notifications
You must be signed in to change notification settings - Fork 0
/
cfn.bashrc
executable file
·30 lines (26 loc) · 952 Bytes
/
cfn.bashrc
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
#!/bin/sh
# create a CFN stack, or update it if it exists
deploy() {
aws cloudformation deploy --stack-name "$1" \
--template-body "file://$2" --parameters "file://$3" \
--capabilities "CAPABILITY_IAM" "CAPABILITY_NAMED_IAM" \
--region=us-east-1
}
# create CFN stacks
create() {
aws cloudformation create-stack --stack-name "$1" \
--template-body "file://$2" --parameters "file://$3" \
--capabilities "CAPABILITY_IAM" "CAPABILITY_NAMED_IAM" \
--region=us-east-1
}
# update already present CFN stacks
update() {
aws cloudformation update-stack --stack-name "$1" \
--template-body "file://$2" --parameters "file://$3" \
--capabilities "CAPABILITY_IAM" "CAPABILITY_NAMED_IAM" \
--region=us-east-2
}
# validate the syntax of yml and json CFN files
verify() {
aws cloudformation validate-template --template-body "file://$1"
}