Local Deployment of api-gateway does not respect stage variables
See original GitHub issueIf I define stage variables for the api-gateway like so:
Type: AWS::Serverless::Api
Properties:
StageName: dev
TracingEnabled: True
Variables:
logging : debug
And I deploy in AWS i get the following in the lambda api event:
"stageVariables": {
"logging": "debug"
},
However if i deploy for local test. I only get:
"stageVariables": null,
The local deployment is not respecting the stageVariables which breaks any application which requires them.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Setting up stage variables for a REST API deployment
Stage variables are name-value pairs that you can define as configuration attributes associated with a deployment stage of a REST API.
Read more >Stage variable with lambda - Amazon API Gateway p18
Welcome to part 18 of the tutorial series on Amazon API Gateway. ... or the lambda backend integration with respect to the stage...
Read more >How to use API Gateway stage variables to call ... - YouTube
... variables to call specific Lambda alias?http://opensourceforgeeks.blogspot.com/2018/09/how-to-use- api - gateway - stage - variables.html.
Read more >Setting stage variables using the Amazon API Gateway console
In this tutorial, you learn how to set stage variables for two deployment stages of a sample API by using the Amazon API...
Read more >Deploying AWS Lambda Code In Different Environments
Deploy the API gateway to both the created stages for respective environments. After completing the above steps, you will require the respective ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Correction -
stageVariables
is also available in the local Lambda event for HTTP API ifstageVariables
property is set. Note that, in REST API, the property to stage variables isVariables
. But in HTTP API, the property isStageVariables
. It can be set underGlobals
as well.@owen We are reviewing another PR which fixes some missing required fields in the
requestContext
in HTTP API Lambda event. That should fix the powertools issue you mentioned.⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.