Deploy on another stage fails when api key is present
See original GitHub issueThis is a (Bug Report / Feature Proposal)
Bug
Description
I had an API deployed on dev stage with api keys. When I tried to deploy the same api with stage prod, it failed with error:
...
CloudFormation - CREATE_IN_PROGRESS - AWS::ApiGateway::ApiKey - ApiGatewayApiKey1
CloudFormation - CREATE_FAILED - AWS::ApiGateway::ApiKey - ApiGatewayApiKey1
...
CloudFormation - DELETE_COMPLETE - AWS::ApiGateway::ApiKey - ApiGatewayApiKey1
...
Serverless Error ---------------------------------------
An error occurred while provisioning your stack: ApiGatewayApiKey1
- dev-key already exists in stack arn:aws:xxxx
Serverless should skip creating keys if they exist.
Additional Data
OS: linux
Node Version: 6.10.3
Serverless Version: 1.12.1
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Setting up a stage using the API Gateway console
After a successful deployment of an API, the stage is populated with default settings. You can use the console or the API Gateway...
Read more >Top 10 Serverless Deployment Errors (and How to Fix Them)
1. Invalid CloudFormation state · 2. Unable to fetch parameters · 3. API Gateway: No integration defined for method · 4. Codebuild deploy...
Read more >REST API (API Gateway v1) - Serverless Framework
API Keys are created globally, so if you want to deploy your service to different stages make sure your API key contains a...
Read more >Azure DevOps: An error occurred while loading the YAML ...
This line is getting repeated twelve times, with only four different values: - stage: deploy-${{ convertToJson(namespace) }}.
Read more >Troubleshoot pipeline runs - Azure DevOps - Microsoft Learn
Can't access Azure Key Vault behind firewall from Azure DevOps ... Your pipeline may not move to the next stage because it is...
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
Closing since this issue is quite old and there’s a potential workaround in the thread.
Additionally we published lots of new versions with fixes which should address this. Feel free to re-open if this is still a problem.
I had a config like:
Figured out that I can use:
But I think bug still applies if I want to have same keys.