Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit ce788a0

Browse files
angelarwmikedeck
authored andcommitted
add setup CFN packaging script
1 parent c4941cb commit ce788a0

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
cd ../lambda-functions/thumbnail
4+
npm install
5+
echo "success installing npm dependencies!"
6+
cd ../copy-s3-object
7+
pip2.7 install -r requirements.txt -t .
8+
echo "success installing python dependencies!"
9+
cd ../../cloudformation
10+
11+
listOfRegions="us-east-1
12+
us-east-2
13+
us-west-2
14+
eu-west-1
15+
ap-south-1
16+
ap-northeast-2
17+
ap-southeast-2
18+
ap-northeast-1"
19+
20+
# change here to profile name being used
21+
profile=sfnworkshop
22+
23+
for region in $listOfRegions
24+
do
25+
bucket="wildrydes-${region}"
26+
echo $bucket
27+
aws cloudformation package --s3-bucket ${bucket} --region ${region} --template ./module-setup.yaml --output-template-file setup-sam-transformed-${region}.yaml --profile ${profile} --s3-prefix ImageProcessing
28+
aws s3 cp setup-sam-transformed-${region}.yaml s3://${bucket}/ImageProcessing/setup-sam.yaml --profile ${profile}
29+
echo "deployed to $bucket"
30+
done

0 commit comments

Comments
 (0)