Skip to content

AWS API Gateway: Error when renaming path variable #3785

Open
@matheusvellone

Description

@matheusvellone

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 from pathvar to pathVar.
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions