Finally, see how to manage AWS DNS services with PowerShell.
The launch of Route 53 is simple, you can register a new domain name on AWS, or you can register a new domain name on another site and then migrate over. Beans on GoDaddy already have a domain name beanxyz.com, the management interface moved to Route 53 is very simple, in Route 53 to create a new Hostedzone beanxyz.com, he will automatically generate the corresponding NS records, In my GoDaddy, the NS record points to the AWS NS on the line.
Manual configuration is simple, as shown below, I have created a blog.beanxyz.com record
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/84/4E/wKioL1eMfPTxhvYtAAD0de8SBdc914.png "title=" 1.PNG " alt= "Wkiol1emfptxhvytaad0de8sbdc914.png"/>
The following simple demo uses PowerShell to modify this record, and the modified operation is actually to delete and create two steps
$domain =get-r53hostedzonesbyname -dnsname beanxyz.com$hostid= $domain. Id.split ("/") [2] get-r53resourcerecordset -hostedzoneid $domain. Id.split ("/") [2] | select - expandproperty resourcerecordsets $change 1 = new-object amazon.route53.model.change$ Change1. action = "DELETE" $change 1. Resourcerecordset = new-object amazon.route53.model.resourcerecordset$change1. resourcerecordset.name = "blog.beanxyz.com" $change 1. resourcerecordset.type = "A" $change 1. Resourcerecordset.ttl = 300$change1. RESOURCERECORDSET.RESOURCERECORDS.ADD (@{value= "52.63.115.148"}) $change 3 = new-object Amazon.route53.model.change$change3. action = "CREATE" $change 3. Resourcerecordset = new-object amazon.route53.model.resourcerecordset$change3. resourcerecordset.name = "Blog.beanxyz.com" $change 3. resourcerecordset.type = "A" $change 3. Resourcerecordset.ttl =&nbSp;300$change3. RESOURCERECORDSET.RESOURCERECORDS.ADD (@{value= "52.63.241.219"}) $params = @{ hostedzoneid= $hostidChangeBatch _comment= "changes the a record for blog.beanxyz.com from 52.63.115.148 to 52.63.241.219 "changebatch_change= $change 1, $change 3} edit-r53resourcerecordset @params
Successful execution
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/84/4E/wKioL1eMfLzgl-_RAAAnCsQgbh8511.png "style=" float: none; "title=" 2.PNG "alt=" Wkiol1emflzgl-_raaancsqgbh8511.png "/>
After a few moments, DNS can successfully parse the
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/84/4E/wKioL1eMfXnBC1BoAAAgoFRYQR4611.png "title=" 3.PNG " alt= "Wkiol1emfxnbc1boaaagofryqr4611.png"/>
This article is from the "Mapo Tofu" blog, please be sure to keep this source http://beanxyz.blog.51cto.com/5570417/1827402
Powershell AWS Automation Management (9)-Route 53