Thursday, July 20, 2017

Route 53

1. Register domain name
2. Create DNS Records

Configuring Route 53
Create hosted zone in Route 53 (Ex: clickplan.net)
Create resource records

3. Update domain registrar with name servers

Set low TTL with registrar

https://oliverhelm.me/sys-admin/updating-aws-dns-records-from-cli

You have installed and configured the AWS cli tools & the credentials you are using have the permissions necessary to make updates.

http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html


aws route53 create-hosted-zone --name example.com --caller-reference 2014-04-01-18:47 --hosted-zone-config Comment="command-line version"
aws configure
aws help

Install AWS CLI

pip install awscli

Configure AWS CLI

aws --version



aws route53 create-hosted-zone --name www.clickplan.net --caller-reference sell-digital-products



aws route53 change-resource-record-sets --hosted-zone-id "/hostedzone/COPY12XYHERE" --change-batch file://changebatch.json

{
 "Comment" : "Create 
}

{
  "Comment": "Create an alias",
  "Changes": [
    {
      "Action": "CREATE",
      "ResourceRecordSet": {
        "Name": "www.clickplan.net",
        "Type": "A",
        "AliasTarget": {
          "HostedZoneId": "hosted zone ID for your CloudFront distribution, Amazon S3 bucket, Elastic Load Balancing load balancer, or Amazon Route 53 hosted zone. Something like Z#BJ6K6RIION7M (this is us-east-1)",
          "DNSName": "DNS domain name for your CloudFront distribution, Amazon S3 bucket, Elastic Load Balancing load balancer, or another resource record set in this hosted zone. Something like: us-east1.amazonaws.com",
          "EvaluateTargetHealth": false
        }
      }
    }
  ]
}

https://www.youtube.com/watch?v=AAq-DDbFiIE
https://blog.jayway.com/2016/06/02/route53-configuration-elastic-beanstalk/
http://docs.aws.amazon.com/cli/latest/reference/route53/change-resource-record-sets.html