Skip to content

Instantly share code, notes, and snippets.

@Caligone
Created July 21, 2018 07:25
Show Gist options
  • Save Caligone/8fc9a9db79a721fda170b702c68f15d3 to your computer and use it in GitHub Desktop.
Save Caligone/8fc9a9db79a721fda170b702c68f15d3 to your computer and use it in GitHub Desktop.
#!/bin/sh
die () {
echo >&2 "$@"
exit 1
}
zip -rq1 target.zip lib/ index.js node_modules/ package.json yarn.lock
[ "$#" -eq 1 ] || die "Usage: ./deploy.sh [arn]"
aws lambda update-function-code \
--function-name $1 \
--zip-file fileb://target.zip \
--region eu-west-1 \
> /dev/null
rm -r target.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment