2011/1/27 Amazon Route53 使ってみた@第1回クラウド女子会

6,883 views

Published on

Japan AWS User Group (JAWS-UG) クラウド女子会 - 第1回
( http://atnd.org/events/11561 ) のLTにて「Amazon Route53 使ってみた」という発表をしました。その時に使用した資料に補足を入れたものを公開します。

Published in: Technology, Business
0 Comments
7 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
6,883
On SlideShare
0
From Embeds
0
Number of Embeds
305
Actions
Shares
0
Downloads
45
Comments
0
Likes
7
Embeds 0
No embeds

No notes for slide

2011/1/27 Amazon Route53 使ってみた@第1回クラウド女子会

  1. 1. @mikiT_T
  2. 2. @mikiT_T
  3. 3. @ IN SOA ns1.baking.jp. root@ns1.baking.jp. ( ... ) IN NS ns1.baking.jp. IN A 111.89.176.107 IN AAAA 2001:200:1c8:1bb:2ac:1bff:fe8d:9c4f! : :egg IN A 204.236.228.219egg IN MX 10 egg
  4. 4. % curl -O http://awsmedia.s3.amazonaws.com/catalog/attachments/dnscurl.pl% chmod +x dnscurl.pl% vi ~/.aws-secrets %awsSecretAccessKeys = ( "my-aws-account" => { id => "A...Q", key => "E...U", }, );% chmod 600 ~/.aws-secrets% sudo yum -y install perl-Digest-HMAC
  5. 5. % vi MyCreateRequest.xml <CreateHostedZoneRequest xmlns="https://route53.amazonaws.com/ doc/2010-10-01/"> <Name>cloudgirl.baking.jp.</Name> <CallerReference>cloudgirl</CallerReference> <HostedZoneConfig> <Comment>here is a comment</Comment> </HostedZoneConfig> </CreateHostedZoneRequest>% ./dnscurl.pl --keyname my-aws-account ---H "Content-Type: text/xml; charset=UTF-8"-X POST --upload-file ./MyCreateRequest.xml https://route53.amazonaws.com/2010-10-01/hostedzone
  6. 6. <?xml version="1.0"?><CreateHostedZoneResponse xmlns="https://route53.amazonaws.com/doc/2010-10-01/"><HostedZone><Id>/hostedzone/Z3OV9VJIQVXT95</Id><Name>cloudgirl.baking.jp.</Name><CallerReference>cloudgirl</CallerReference><Config><Comment>here is a comment</Comment></Config></HostedZone><ChangeInfo><Id>/change/C19FDVQALMKN4T</Id><Status>PENDING</Status><SubmittedAt>2011-01-27T06:35:06.610Z</SubmittedAt></ChangeInfo><DelegationSet><NameServers><NameServer>ns-1657.awsdns-15.co.uk</NameServer><NameServer>ns-753.awsdns-30.net</NameServer><NameServer>ns-1505.awsdns-60.org</NameServer><NameServer>ns-258.awsdns-32.com</NameServer></NameServers></DelegationSet></CreateHostedZoneResponse>
  7. 7. $ ./dnscurl.pl --keyname my-aws-account -- https://route53.amazonaws.com/2010-10-01/hostedzone/Z3OV9VJIQVXT950.0%<?xml version="1.0"?><GetHostedZoneResponse xmlns="https://route53.amazonaws.com/doc/2010-10-01/"><HostedZone><Id>/hostedzone/Z3OV9VJIQVXT95</Id><Name>cloudgirl.baking.jp.</Name><CallerReference>cloudgirl</CallerReference><Config><Comment>here is a comment</Comment></Config></HostedZone><DelegationSet><NameServers><NameServer>ns-1657.awsdns-15.co.uk</NameServer><NameServer>ns-753.awsdns-30.net</NameServer><NameServer>ns-1505.awsdns-60.org</NameServer><NameServer>ns-258.awsdns-32.com</NameServer></NameServers></DelegationSet></GetHostedZoneResponse>
  8. 8. % dig cloudgirl.baking.jp soa@ns-1657.awsdns-15.co.uk +norec +shortns-1657.awsdns-15.co.uk. awsdns-hostmaster.amazon.com. 1 7200 9001209600 86400% dig cloudgirl.baking.jp ns@ns-1657.awsdns-15.co.uk +norec +shortns-258.awsdns-32.com.ns-753.awsdns-30.net.ns-1505.awsdns-60.org.ns-1657.awsdns-15.co.uk.
  9. 9. % vi MyRecordsRequest.xml <?xml version="1.0" encoding="UTF-8"?> <ChangeResourceRecordSetsRequest xmlns="https:// route53.amazonaws.com/doc/2010-10-01/"> <ChangeBatch><Comment>here is a comment</Comment> <Changes><Change> <Action>CREATE</Action> <ResourceRecordSet> <Name>www.cloudgirl.baking.jp.</Name> <Type>A</Type><TTL>14400</TTL> <ResourceRecords><ResourceRecord> <Value>204.236.228.219</Value> </ResourceRecord></ResourceRecords> </ResourceRecordSet> </Change></Changes></ChangeBatch> </ChangeResourceRecordSetsRequest>
  10. 10. % ./dnscurl.pl --keyname my-aws-account -- -H"Content-Type: text/xml; charset=UTF-8" -XPOST --upload-file ./MyRecordsRequest.xmlhttps://route53.amazonaws.com/2010-10-01/hostedzone/Z3OV9VJIQVXT95/rrset0.0%<?xml version="1.0"?><ChangeResourceRecordSetsResponsexmlns="https://route53.amazonaws.com/doc/2010-10-01/"><ChangeInfo><Id>/change/CZEDHHNT49Q1J</Id><Status>PENDING</Status><SubmittedAt>2011-01-27T07:22:57.672Z</SubmittedAt></ChangeInfo></ChangeResourceRecordSetsResponse>
  11. 11. % dig www.cloudgirl.baking.jp a@ns-1657.awsdns-15.co.uk +norec +short204.236.228.219
  12. 12. @ IN SOA ns1.baking.jp. root@ns1.baking.jp. ( ... ) IN NS ns1.baking.jp. IN A 111.89.176.107 IN AAAA 2001:200:1c8:1bb:2ac:1bff:fe8d:9c4f! : :egg IN A 204.236.228.219egg IN MX 10 egg;for AWS Route53cloudgirl IN NS ns-258.awsdns-32.com.cloudgirl IN NS ns-753.awsdns-30.net.cloudgirl IN NS ns-1505.awsdns-60.org.cloudgirl IN NS ns-1657.awsdns-15.co.uk.
  13. 13. % dig www.cloudgirl.baking.jp a +short204.236.228.219
  14. 14. % vi RecordDelete.xml <?xml version="1.0" encoding="UTF-8"?> <ChangeResourceRecordSetsRequest xmlns="https:// route53.amazonaws.com/doc/2010-10-01/"> <ChangeBatch><Comment>here is a comment</Comment> <Changes><Change> <Action>DELETE</Action> <ResourceRecordSet> <Name>www.cloudgirl.baking.jp.</Name> <Type>A</Type><TTL>14400</TTL> <ResourceRecords><ResourceRecord> <Value>204.236.228.219</Value> </ResourceRecord></ResourceRecords> </ResourceRecordSet> </Change></Changes></ChangeBatch> </ChangeResourceRecordSetsRequest>
  15. 15. % ./dnscurl.pl --keyname my-aws-account -- -H"Content-Type: text/xml; charset=UTF-8" -XPOST --upload-file ./DeleteRecord.xml https://route53.amazonaws.com/2010-10-01/hostedzone/Z3OV9VJIQVXT95/rrset0.0%<?xml version="1.0"?><ChangeResourceRecordSetsResponsexmlns="https://route53.amazonaws.com/doc/2010-10-01/"><ChangeInfo><Id>/change/C1XANU2J92F97U</Id><Status>PENDING</Status><SubmittedAt>2011-01-27T08:57:10.761Z</SubmittedAt></ChangeInfo></ChangeResourceRecordSetsResponse>
  16. 16. $ dig www.cloudgirl.baking.jp; <<>> DiG 9.7.0-P2-RedHat-9.7.0-5.P2.6.amzn1 <<>>www.cloudgirl.baking.jp;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 36539;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1,ADDITIONAL: 0;; QUESTION SECTION:;www.cloudgirl.baking.jp.! IN! A;; AUTHORITY SECTION:cloudgirl.baking.jp.!900!IN! SOA!ns-1657.awsdns-15.co.uk.awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400;; Query time: 288 msec;; SERVER: 172.16.0.23#53(172.16.0.23);; WHEN: Thu Jan 27 08:57:52 2011;; MSG SIZE rcvd: 128
  17. 17. % ./dnscurl.pl --keyname my-aws-account -- -XDELETE https://route53.amazonaws.com/2010-10-01/hostedzone/Z3OV9VJIQVXT950.0%<?xml version="1.0"?><DeleteHostedZoneResponse xmlns="https://route53.amazonaws.com/doc/2010-10-01/"><ChangeInfo><Id>/change/CDRHBQU3K6NR8</Id><Status>PENDING</Status><SubmittedAt>2011-01-27T10:17:19.487Z</SubmittedAt></ChangeInfo></DeleteHostedZoneResponse>
  18. 18. % dig www.cloudgirl.baking.jp a@ns-1657.awsdns-15.co.uk +norec; <<>> DiG 9.7.0-P2-RedHat-9.7.0-5.P2.6.amzn1 <<>>www.cloudgirl.baking.jp a@ns-1657.awsdns-15.co.uk +norec;; global options: +cmd;; connection timed out; no serverscould be reached

×