Skip to content

Ernyoke/aws-custom-domain-r53

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aws-custom-domain-r53

This repository is an attachment for the blog post: https://ervinszilagyi.dev/articles/expose-our-rest-api-on-aws-with-a-custom-domain.html

Deployment

Before attempting to deploy, please make sure to set the following values:

  1. Deploy route53 stack:
cd route53
terraform init
terraform apply
  1. Go to your custom domain and change the nameservers to the ones you get from the output of the route53 stack.

Changing nameservers can take up to 48 hours to take effect!

You should be able to check if the change is in effect with the following command:

dig +short NS yourdomain.com
  1. Make sure your nameserver change is in effect, otherwise the following step will fail! Deploy certificate stack:
cd certificate
terraform init
terraform apply
  1. Deploy api-gw:
cd api-gw
terraform init
terraform apply
  1. Test the REST API with the invoke url from the api-gw stack output:

The invoke url is a generated value, don't use the one from the example!!!

curl https://x4kk2j4sal.execute-api.us-east-1.amazonaws.com/dev
{
    "statusCode": 200,
    "message": "Works!"
}
  1. If you got a successful response, you should test with the custom domain as well:
curl https://yourdomain.com
{
    "statusCode": 200,
    "message": "Works!"
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages