-
Notifications
You must be signed in to change notification settings - Fork 233
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
Allow custom stage for HTTP API #334
Comments
Hmm, so I recall working on this and it was based on the related conversation here: serverless/serverless#7052 (comment) and serverless/serverless#7331 ...where the Serverless framework will always deploy HTTP APIs to the $default stage as the serverless framework doesn't really use stages and creates an entirely different API for each "stage". What is the use case you have for a defined stage instead of $default? You might be able to drop |
Looks like they reverted that change and added back support for paths, so it would make sense to fix this. serverless/serverless#7383 |
The original need for this was migration from the REST API. Even if I don't need multiple stages right now, API Gateway supports them. So not allowing to use them in this plugin is a limitation. This reasoning doesn't work in my case:
Mainly due CloudFormation's 200 resource limit I split API creation into its own separate stack. Since this HTTP API is being created in the Resources section, theoretically I'm not limited by the number of stages I can create. Then in other stacks with lambdas/endpoints I reuse this previously created HTTP API resource. So I should be able to use this API by referencing it (related to #335) and specifying a stage to which I want to deploy and link my domain. |
Hello, When I manually create the $default stage in the API everything works fine. There is any way how I could automate that creation? |
Any intention of implementing this? It's an odd limitation. |
Community Note
Bug Report
Error Description
When using HTTP API the stage seems to be hardcoded to $default.
See
serverless-domain-manager/index.ts
Line 606 in 2576641
Currently it's impossible to use anything other than the $default stage with this plugin.
Command Run
sls deploy
Console Output
Domain Manager Configuration
Versions
Possible Solution
Replace
With
The text was updated successfully, but these errors were encountered: