Skip to content

Instantly share code, notes, and snippets.

@tmurphree
Created December 2, 2020 16:01
Show Gist options
  • Save tmurphree/6af8ad09a66870f2197f121b089b272e to your computer and use it in GitHub Desktop.
Save tmurphree/6af8ad09a66870f2197f121b089b272e to your computer and use it in GitHub Desktop.
AWS Lambda zip deployment bash script
#!/bin/bash
FILE_PATH="tmp/lambdaDeployment.zip";
FUNCTION_NAME="tm-test";
rm -f $FILE_PATH;
# make zip with with a whitelist
zip -r $FILE_PATH . -i package*.json "src/*" "node_modules/*";
aws lambda update-function-code --function-name $FUNCTION_NAME --region us-east-1 --zip-file fileb://$FILE_PATH;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment