Skip to content

Commit e8f87ec

Browse files
committed
Distribution script for AWSLabs
1 parent caa66c5 commit e8f87ec

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

upload.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
#set -x
3+
4+
if [ "$#" == 0 -o "$1" == "" ]; then
5+
echo "You must provide the version number to upload, and the AWS CLI profile name to use"
6+
exit -1
7+
fi
8+
9+
regions=`aws ec2 describe-regions --query Regions[*].RegionName --output text`
10+
11+
aws s3 cp dist/LambdaStreamToFirehose-$1.zip s3://aws-lambda-streams-to-firehose/LambdaStreamToFirehose-$1.zip --acl public-read --profile $2
12+
13+
echo "Created base distribution in us-east-1"
14+
15+
for region in `echo $regions`; do
16+
echo "Copying distribution to $region"
17+
aws s3 cp s3://aws-lambda-streams-to-firehose/LambdaStreamToFirehose-$1.zip s3://awslabs-code-$region/LambdaStreamToFirehose/LambdaStreamToFirehose-$1.zip --source-region us-east-1 --region $region --profile $2
18+
done

0 commit comments

Comments
 (0)