Prerequisites
Currently we have deployed API Gateway that is connected to ECS instance with Elastic Load Balancer.
API Gateway is functioning correctly and we can invoke the instance with the generated invoke URL:
Note: ECS instance is running Apollo Client for Graph QL access, so we access the client using
{invoke_url}/graphql
and this works as expected.
Setting up the custom domain:
We follow the instructions provided in https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html
Step-by-step
- We have already purchased a domain which we use for our services + SSL certificate.
- We want to use subdomain.domain.com to direct to the API Gateway
- We go to the API Gateway and setup a custom domain:
- Next, we create an A Record alias that points to the generated API Gateway domain name that was created in the step 3.
- We setup the API Mapping to point to the existing API Gateway API:
All done? This is where we get stuck. According to the documentation, this should be enough but what we receive from the
API Gateway domain generated in step 3
subdomain.domain.com which was set in Route53 to point to the API Gateway
The question
In order to achieve the desired result of being able to access the API Gateway using custom domain: What did we do wrong and what to do to get it working?
Can provide extra information if needed.