lambda-update-alias
Update or create a AWS lambda alias
Install
$ npm install --save lambda-update-alias
Usage
const updateAlias = ; ;
API
updateAlias(name, alias, [options])
Returns a promise for the result object.
name
Type: string
Name of the lambda function.
alias
Type: string
Name of the alias that should be attached to the lambda function.
options
version
Type: string
Default: latest
Name of the version where the alias should be attached to. If not provided, the alias will be attached to the version
with the highest number. $LATEST
is treated as version 0
.
awsProfile
Type: string
AWS Profile. The user related to the profile should have
admin access to API Gateway and should be able to invoke lambda:AddPermission
.
Can be overridden globally with the AWS_PROFILE
environment variable.
awsFilename
Type: string
Filename to use when loading credentials.
awsRegion
Type: string
Default: us-west-1
AWS region.
User Policy
The profile creating or updating the alias should be able to list the versions of the function and create and update the aliases.
Related
- lambda-update-alias-cli - CLI for this module
License
MIT © Sam Verschueren