serverless / serverless/serverless
AWS API Gateway: Error when renaming path variable
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 46.9k
- Forks
- 5.7k
- Avg merge
- 10h 7m
- Merged PRs (30d)
- 57
Description
This 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 frompathvartopathVar. - 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:
- #3075
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the deployment using the shown service configuration, changing /{pathvar} to /{pathVar} and redeploying. Start by tracing the AWS API Gateway resource update path and the handling of renamed path variables; done means the route is updated without the sibling-variable error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, javascript, node.js
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100