Skip to content

Use stage variables to specify lambda qualifier in APIG #40

Closed
@vkkis93

Description

@vkkis93
Contributor

On Integration request page field lambda function always has value of last deployed stage.
For Example
getUser:staging or getUser:production.
I think it should be like getUser:${functionAlias}
Where functionAlias value should be specified in stage variables tab

Activity

HyperBrain

HyperBrain commented on May 24, 2017

@HyperBrain
Member

Good point, thank you. I will investigate the issue.

HyperBrain

HyperBrain commented on May 24, 2017

@HyperBrain
Member

I set a stage variable SERVERLESS_ALIAS that equals the deployed stage, so if I would set it to getUser:${SERVERLESS_ALIAS} it should work.
Then you could specify that explicitly for testing.

Nevertheless, the deployed stages should call the aliased functions correctly. It is only an issue with the AWS ApiGateway testing console.

changed the title [-]API Gateway integration Request has incorrect value in field **lambda function**[/-] [+]Use stage variables to specify lambda qualifier in APIG[/+] on May 24, 2017
added this to the 1.1.0 milestone on May 24, 2017
HyperBrain

HyperBrain commented on May 25, 2017

@HyperBrain
Member

@vkkis93 This was indeed a great idea 🙌 I changed the qualifier/alias to the stage variable and tested it with two different aliases. It would be good, if you also give it a try with the alias plugin master branch.

vkkis93

vkkis93 commented on May 26, 2017

@vkkis93
ContributorAuthor

@HyperBrain brilliant work.
Thank you.

vkkis93

vkkis93 commented on May 26, 2017

@vkkis93
ContributorAuthor

@HyperBrain Can you create new npm package with this fix?

HyperBrain

HyperBrain commented on May 26, 2017

@HyperBrain
Member

I will publish the fix in a few moments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @HyperBrain@vkkis93

        Issue actions

          Use stage variables to specify lambda qualifier in APIG · Issue #40 · serverless-heaven/serverless-aws-alias