Created
June 9, 2021 04:06
-
-
Save brevityinmotion/13cc4250a30f1f5ecaf71cf4eef632a5 to your computer and use it in GitHub Desktop.
Lambda package update template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
LAMBDANAME="brevity-example" | |
mkdir /home/ec2-user/environment/brevity-infra/lambdas/build/$LAMBDANAME | |
cp -r /home/ec2-user/environment/brevity-infra/lib/brevitycore /home/ec2-user/environment/brevity-infra/lambdas/build/$LAMBDANAME | |
cp /home/ec2-user/environment/brevity-infra/lambdas/lambda_function_$LAMBDANAME.py /home/ec2-user/environment/brevity-infra/lambdas/build/$LAMBDANAME/lambda_function.py | |
cd /home/ec2-user/environment/brevity-infra/lambdas/build/$LAMBDANAME | |
zip -r ../$LAMBDANAME.zip * | |
aws s3 cp /home/ec2-user/environment/brevity-infra/lambdas/build/$LAMBDANAME.zip s3://brevity-deploy/infra/ | |
aws lambda update-function-code --function-name $LAMBDANAME --s3-bucket brevity-deploy --s3-key infra/$LAMBDANAME.zip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment