0
votes

I'm currently working on a client project in AWS. We have a REST API with AWS Lambda and API Gateway. The frontend is available via Cloudfront and stored in an S3.
The API should be available under api.client.com and the frontend under admin.client.com.

My problem is that the client's domain is hosted externally and not fully managed in Route53. Is there a way to get create subdomains (api and admin) in Route53 oder to create an A-Record in the external DNS pointing to API Gateway / Cloudfront?

1
You don't need R53 to associate api.client.com with api gateway. Just setup everything on the external domain provider.Marcin
@Marcin how do i associate the subdomain with AWS? The API Gateway doesn't have an static ip address.c0deltin

1 Answers

0
votes

I would say that you should create a domina named anything in your account and have A records pointing to the API Gateway and the Cloudfront.

These A records you point to from the main domain with cname records.

So in the main domain you have: api.client.com CNAME api.yourR53domain.com admin.client.com CNAME admin.yourR53domain.com

In R53: api.yourR53domain.com A (your api gateway endpoint) admin.yourR53domain.com A (your frontend endpoint)