官术网_书友最值得收藏!

Top-level domain

The first thing most users of your product will encounter is your address or Uniform Resource Indicator (URI). We will be using the cloudpatterns.uk domain for the examples in this book. A URL for this domain would look like https://my.cloudpatterns.uk. If you don't have a domain name, now is a good time to create one. There is no API to do this, but you can do it in the UI—this is part of the raison d'être for Route53 (https://console.aws.amazon.com/route53/home). 

Obtaining a URI is usually not free. I chose a .uk domain for this book because it was the lowest cost option.

Click the Get started now button and then the Register Domain button on the subsequent page:

You can also transfer your existing domain to AWS if you already have one: 

Search for an available domain:

Fill out your contact information and read and agree to the terms of service, then purchase your domain:

It took about ten minutes for me to get my registration confirmation. 

Some registrars may take up to three days.

Amazon will create your root-hosted zone by default. Let's add a subdomain with Terraform. Copy your main.tf file to a new folder called Chapter3 and run terraform init:

# grab the existing cloudpatterns-zone in Route53
data "aws_route53_zone" "main" {
name = "cloudpatterns.uk."
}

resource "aws_route53_zone" "book" {
name = "book.cloudpatterns.uk"

tags {
Environment = "book"
}
}

resource "aws_route53_record" "book-ns" {
zone_id = "${data.aws_route53_zone.main.zone_id}"
name = "book.cloudpatterns.uk"
type = "NS"
ttl = "30"

records = [
"${aws_route53_zone.book.name_servers.0}",
"${aws_route53_zone.book.name_servers.1}",
"${aws_route53_zone.book.name_servers.2}",
"${aws_route53_zone.book.name_servers.3}",
]
}

Create your Terraform plan and apply it. You'll see your new zones in the AWS console:

Click on one to see the records it created:

We now are ready to create our globally available product.

主站蜘蛛池模板: 十堰市| 抚远县| 利津县| 襄汾县| 库尔勒市| 会宁县| 鄂伦春自治旗| 开远市| 巫溪县| 文成县| 潜江市| 蒙自县| 定西市| 山东省| 江山市| 萝北县| 白城市| 海兴县| 太和县| 平陆县| 五家渠市| 温州市| 兴仁县| 开化县| 湖北省| 仪征市| 河池市| 南阳市| 桐梓县| 玉龙| 察哈| 山阳县| 荥阳市| 江城| 凌云县| 富顺县| 富裕县| 阿克苏市| 教育| 汉中市| 铜鼓县|