Following the advice of the serverless stack tutorial, my serverless app splits the API amongst multiple services, which has worked well while using REST APIs.
createNotes: handler: create.main events: - http: method: POST path: /notes
After discovering AWS now supports simplified/cheaper/faster HTTP APIs, I was excited to give it a try in my serverless app. Simply changing
sls deploy did the trick!
createNotes: handler: create.main events: - httpApi: method: POST path: /notes
When splitting an API into multiple services (aka Serverless projects with their own serverless.yml), API Gateway creates custom domains for each service. The serverless-stack tutorial provides a solution to this problem when building API Gateway REST Api’s (Share an API Endpoint Between Services.
However, when utilizing API Gateway’s new HTTP API, the same solution outlined above does not work. I assume it will be addressed in the future, but the feature does not appear to exist in the Severless Framework.
In the meantime, are there workarounds or best practices to address this issue?