- Newest
- Most votes
- Most comments
endpoint : event.requestContext.domainName + '/' + event.requestContext.stage
"No method found matching route test0/@connections/PxWP8cfSDoECFYw= for http method POST."
Based on the error message and your code, I guess you're using a custom domain name with a base mapping to the API's "test0" stage. In the case,
https://YOUR_DOMAIN/test0/@connections/PxWP8cfSDoECFYw=
has a same effect to invoke:
https://[apiId].execute-api.<region>.amazonaws.com/test0/test0/@connections/PxWP8cfSDoECFYw=
(Note there is "test0" twice in the URI)
This is the reason why the route was resolved to "test0/@connections/PxWP8cfSDoECFYw=" instead of "@connections/PxWP8cfSDoECFYw=".
In the case, you should omit the stage name in the endpoint URI.
@jwaataws, thanks for the swift response.
And yes, looks like you described this scenario exactly, and your suggestion of removing the stage name from the endpoint see this working well.
Many Thanks,
Ady
Remove the stage from the url if you are using a custom domain.
Custom domain as in, I was using https://mywebsite.com, and when we append the stage, it was like https://mywebsite.com/dev. Then I got the above error. removing the stage fixed the issue
Relevant content
- asked 5 years ago
- asked 5 years ago
- asked 5 years ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago