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 Antwort
1
Akzeptierte Antwort

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
EXPERTE
beantwortet vor 5 Monaten
profile picture
EXPERTE
überprüft vor 2 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen