amazon-dns-route-53
signup for Amazon DNS service download dnscurl.pl chmod +x dnscurl.pl
Create a the access file /root/.aws-secrets (make sure it doesn't already exist!)
Use the Amazon -> Security Credentials -> Access Credentials
ACCESS KEYS (access key id and secret access key)
%awsSecretAccessKeys = ( "my-aws-account" => { id => "0F1V9UKMN23IEXAMPLE2", key => "lkTwZRalREYSU7lbSS5VoUhdYREcwsasEXAMPLEQ", }, );
chmod 600 .aws-secrets
NOTE: we've just created a variable "my-aws-account" which we'll see again...
Create the "MyCreateRequest.xml" file (replace the Name with your domain, trailing .)
The Perl script will POST the xml file with the credentials...
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
THE RESPONSE ANSWER (not very pretty xml)
CREATE AN A RECORD (createARecord.xml)
./dnscurl.pl --keyname my-aws-account -- -H "Content-Type: text/xml; charset=UTF-8" -X POST --upload-file ./createARecord.xml https://route53.amazonaws.com/2010-10-01/hostedzone/YOURZONE_IDHERE/rrset
RETURNS
VERIFY
./dnscurl.pl --keyname my-aws-account -- -H "Content-Type: text/xml; charset=UTF-8" https://route53.amazonaws.com/2010-10-01/hostedzone/ZONE_ID/rrset
dig @ns-1489.awsdns-58.org domain.com www.domain.com
DELETE AN A RECORD (deleteARecord.xml)
Basically to "change" you delete the old record and create a new one
./dnscurl.pl --keyname my-aws-account -- -H "Content-Type: text/xml; charset=UTF-8" -X POST --upload-file ./filename.xml https://route53.amazonaws.com/2010-10-01/hostedzone/YOURZONE_IDHERE/rrset
RETURNS
TROUBLESHOOTING ( 7.15.5 or newer of Curl )
ERROR Can't locate Digest/HMAC_SHA1.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at ./dnscurl.pl line 26.
sudo apt-get install libdigest-hmac-perl
(SIMILAR - dependency Perl modules, which you can download from CPAN) Digest::HMAC_SHA1 FindBin MIME::Base64 Getopt::Long File::Temp File::Basename Fcntl IO::Handle
FUNNY CREDENTIALS FILE ERROR
Welcome to AWS DNS curl! You'll need to install your AWS credentials to get started.
For security reasons, this tool will not accept your AWS secret access key on the command line. Instead, you need to store them in a file named /root/.aws-secrets.
APPARENTLY AMAZON'S SCRIPT IS PRETTY SPECIFIC ABOUT WHERE IT WANTS THAT FILE...
FURTHER RESEARCH
GET /2010-10-01/hostedzone?maxitems=1