Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use stage variables to specify lambda qualifier in APIG #40

Closed
vkkis93 opened this issue May 24, 2017 · 6 comments
Closed

Use stage variables to specify lambda qualifier in APIG #40

vkkis93 opened this issue May 24, 2017 · 6 comments
Milestone

Comments

@vkkis93
Copy link
Contributor

vkkis93 commented May 24, 2017

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

@HyperBrain
Copy link
Member

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

@HyperBrain
Copy link
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.

@HyperBrain HyperBrain changed the title API Gateway integration Request has incorrect value in field **lambda function** Use stage variables to specify lambda qualifier in APIG May 24, 2017
@HyperBrain HyperBrain added this to the 1.1.0 milestone May 24, 2017
@HyperBrain
Copy link
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
Copy link
Contributor Author

vkkis93 commented May 26, 2017

@HyperBrain brilliant work.
Thank you.

@vkkis93
Copy link
Contributor Author

vkkis93 commented May 26, 2017

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

@HyperBrain
Copy link
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
Projects
None yet
Development

No branches or pull requests

2 participants