lua

lambda-update-alias

Update or create a AWS lambda alias

Showing:

Popularity

Downloads/wk

64

GitHub Stars

2

Maintenance

Last Commit

6yrs ago

Contributors

0

Package

Dependencies

4

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

lambda-update-alias

Build Status Coverage Status

Update or create a AWS lambda alias

Install

$ npm install --save lambda-update-alias

Usage

const updateAlias = require('lambda-update-alias');

updateAlias('myLambdaFunction', 'v1'}).then(result => {
    console.log(result);
    /*
    {
        AliasArn: 'arn:aws:lambda:us-west-1:123456789012:function:myLambdaFunction:v1',
        Name: 'v1',
        FunctionVersion: '3',
        Description: 'My lambda function description'
    }
    */
});

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.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Stmt1454507191000",
            "Effect": "Allow",
            "Action": [
                "lambda:CreateAlias",
                "lambda:ListVersionsByFunction",
                "lambda:UpdateAlias"
            ],
            "Resource": [
                "*"
            ]
        }
    ]
}

License

MIT © Sam Verschueren

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial