SAM Deployment of HttpApi with a custom domain and Geolocation routing in route53

0

I am learning SAM and want to replicate an existing API Gateway app which is multi-region and uses Route53 Geolocation host records to control routing traffic to the correct region. The API is based off this article. https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-api-gateway.html

I have tried using the Domain property of the Serverless::HttpApi resource in my template, but the Route53 options do not appear to support the Geolocation routing option. https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-property-httpapi-route53configuration.html

I also tried creating a separate Route53::RecordSet, which allows me to create Geolocation records, but I can't seem to reference the alias URI of the Serverless::HttpApi resource.

This seems like a common setup and I assume there is a correct way to do it in SAM, but I have not been able to find it.

1 Answer
1
Accepted Answer

Hi,

I would suggest to take a look github.com/aws-samples/serverless-patterns, specifically this

It helped me to better understand how you can use SAM on examples.

profile picture
EXPERT
answered 4 months ago
profile picture
EXPERT
reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions