- Create AIM role to allow full access to DNZ zone.
Security Policy:{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "route53:*" ], "Resource": [ "arn:aws:route53:::hostedzone/ZONE-ID (not zone name)" ] }, { "Effect": "Allow", "Action": [ "elasticloadbalancing:DescribeLoadBalancers" ], "Resource": [ "*" ] } ] } - Attach AIM role to EC2 instance and launch it.
- Add following command to OS shutdown script -
aws route53 change-resource-record-sets --hosted-zone-id ZONE-ID --change-batch '{"Changes": [ {"Action": "CREATE","ResourceRecordSet": { "Name": "test.test.com.", "Type": "CNAME", "TTL": 600, "ResourceRecords": [ {"Value": "'`curl http://169.254.169.254/latest/meta-data/public-hostname 2> /dev/null`'" }] } } ] }' - Add following command to OS shutdown script -
aws route53 change-resource-record-sets --hosted-zone-id ZONE-ID --change-batch '{"Changes": [ {"Action": "DELETE","ResourceRecordSet": { "Name": "test.test.com.", "Type": "CNAME", "TTL": 600, "ResourceRecords": [ {"Value": "'`curl http://169.254.169.254/latest/meta-data/public-hostname 2> /dev/null`'" }] } } ] }'
Navigation
Style Credit
- Base style: Librarian's Dream by
- Theme: Amaranth by
Expand Cut Tags
No cut tags