Add full support for stages
See original GitHub issueRight now, the stages feature needs more work to be feature complete. The proposed idea is:
chalice deploy prod
- Will create a new API gateway stage if necessary- The lambda function code is zipped up and sent to lambda. A new function version is created
- A lambda alias for the the stage name points to the new function version updated.
I also need to update the API gateway integration request to forward to the appropriate lambda function based on the stage name. I’ll need to add a context variable with the stage name.
I’d also like to add an optimization to just update lambda aliases when you go from dev->prod
where the lambda code has not changed. In that case we can just flip the alias.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:14
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Use Stage Manager to organize apps and windows on Mac
Add Stage Manager to the menu bar by dragging it from Control Center to the menu bar. Or choose Apple menu > System...
Read more >Add a phase, stage or task to the work breakdown
Add phases to group stages together. To add a phase: Click on the ellipsis and select 'Enable phases'. You will see the stage...
Read more >Stage Manager on iPad: How it works in iPadOS 16 - 9to5Mac
This detailed guide with screenshots and in-depth video cover how the new Stage Manager on iPad feature works in iPadOS 16.
Read more >How To Add Opportunity Stages To Outreach
Opportunity Stages must be added to the stage options in Outreach prior to configuring Opportunity Stages in the CRM plugin.
Read more >Stages Link Support
Stages Link Support. Search our support articles or create a support ticket to speak with someone at Stages. Support Home.
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
What is the stage in API Gateway buying us in this scenario? This isn’t really a Chalice-specific question. This is a general question about Lambda and API Gateway although I think it’s important that the approach we build into Chalice make sense.
Stages seem to be an attempt to provide some sort of resource isolation but I think accounts are really a much better way to accomplish isolation because they can be applied to all resource types, not just API Gateway endpoints.
So, if we are using accounts for isolation it seems like we would just deploy new versions of functions within the appropriate account, move aliases around as necessary and stages would be superfluous.
Thoughts?
There’s a PR with a first attempt at this approach: https://github.com/awslabs/chalice/pull/264 Hopefully this is a reasonable compromise of the suggested approaches so far:
--profile
to a different account if you were deploying locally)So for example, running:
Will result in 2 APIG APIs, 2 lambda functions, 2 roles, etc. I’m also adding lambda env var integration so if you had other resources such as DDB tables, you could configure a separate table per stage and specify the table names vie environment variables that are passed to the lambda function.