awslabs / aws-api-gateway-developer-portal

A Serverless Developer Portal for easily publishing and cataloging APIs
Apache License 2.0
927 stars 399 forks source link

While Creating i get an error, I am using SAM #424

Open kaivgit opened 4 years ago

kaivgit commented 4 years ago

Just tried to run the using sam and seeing this error CREATE_FAILED AWS::ApiGateway::RestApi ApiGatewayApi Errors found during import: Unable to create resource at path '/version/:v4_02': Resource's path part only allow a-zA-Z0-9.- and curly braces at the beginning and the end. (Service: AmazonApiGateway; Status Code: 400; Error Code: BadRequestException; Request ID: 34da506f-43cd-43d9-94a3-f84d46a784dd)

Any suggestions on what's wrong here

smoghal commented 4 years ago

This seems to be an issue with a recent commit . I replaced resource path /version/:v4_0_2 in cloudformation/template.yaml with /version/v4_0_2 and the error went away.

I had to re-run the sam package command after making the change above to regenerate cloudformation/packaged.yaml. Then I re-ran sam deploy command to redeploy portal. It went through successfully.