Skip to content

Instantly share code, notes, and snippets.

@mcalavera81
Last active September 25, 2020 09:52
Show Gist options
  • Save mcalavera81/ddbc86f320e05c25716195a01f4e5449 to your computer and use it in GitHub Desktop.
Save mcalavera81/ddbc86f320e05c25716195a01f4e5449 to your computer and use it in GitHub Desktop.
sls package --stage alpha -p output //--stage alpha
# Update $LATEST version of function
aws lambda update-function-code --function-name apollo-lambda-alpha-graphql --zip-file fileb://output/apollo-lambda.zip --output json
# Publish new version of function
VERSION=$(aws lambda publish-version --function-name apollo-lambda-alpha-graphql --output json | jq -r .Version)
# Verify that the new version is healthy
# Set the primary version on the alias to the new version and reset the additional versions (100% weighted)
aws lambda update-alias --function-name apollo-lambda-alpha-graphql --name myalias --function-version $VERSION --routing-config '{}'
#############################################
# aws lambda create-alias --function-name apollo-lambda-alpha-graphql --name myalias --function-version 143
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment