AWS API Gateway: Error when renaming path variable
See original GitHub issueThis is a Bug Report
Description
Tried to rename a path variable and got the error. Deployed a service with the following yml config:
service: aws-nodejs
provider:
name: aws
runtime: nodejs6.10
functions:
hello:
handler: handler.hello
events:
- http:
path: /{pathvar}
method: put
Then changed it to
service: aws-nodejs
provider:
name: aws
runtime: nodejs6.10
functions:
hello:
handler: handler.hello
events:
- http:
path: /{pathVar} # Changed this variable
method: put
Then tried to redeploy the service to update the variable name and got the error.
For bug reports:
- What went wrong?
An error occurred while provisioning your stack: ApiGatewayResourcePathvarVar. A sibling ({pathvar}) of this resource already has a variable path part -- only one is allowed.
- What did you expect should have happened?
Expected the service to deploy the new route over the old one. Renaming the path variable from
pathvar
topathVar
. - What stacktrace or error message from your provider did you see?
An error occurred while provisioning your stack: ApiGatewayResourcePathvarVar - A sibling ({pathvar}) of this resource already has a variable path part -- only one is allowed
Similar or dependent issues:
Additional Data
- Serverless Framework Version you’re using: 1.15.3
- Operating System: WIN 10
- Provider Error messages:
An error occurred while provisioning your stack: ApiGatewayResourcePathvarVar. A sibling ({pathvar}) of this resource already has a variable path part -- only one is allowed.
If more information is needed, just let me know.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:94
- Comments:67 (3 by maintainers)
Top Results From Across the Web
Resolve "Illegal character" errors from API Gateway APIs with ...
I'm using an AWS CloudFormation template (or OpenAPI API definition) to create an Amazon API Gateway API with a proxy resource. When I...
Read more >Transforming API requests and responses
Learn how to set up parameter mapping to modify API requests and responses for Amazon API Gateway HTTP APIs.
Read more >Tutorial: Build a REST API with HTTP non-proxy integration
Learn how to create an API Gateway API with the HTTP custom integration using the API Gateway console.
Read more >How can I troubleshoot 5xx errors for API Gateway? - AWS
500 error: internal server error · Errors in the AWS Lambda function code. · Missing permissions for using a stage variable. · Incorrect...
Read more >API Gateway similar routes different methods problem
An error occurred: ApiGatewayResourceChecksIdVar - A sibling ({status}) of this resource already has a variable path part -- only one is ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
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
Workaround for now: Comment out the function from your
serverless.yml
, run a full deployment. This will delete the API gateway endpoint entirely, and then you can uncomment the function and run a deployment to deploy the new function with the new pathParam.Is any solution available?