Windows – How to install and use the cli53 tools on Windows

amazon-route53dns-zonedomain-name-systempowershellwindows

I'm trying to find the simplest way to import a large number of BIND zone files in to Route 53. I've had a quick look at the AWS CLI and AWS Tools for Windows PowerShell but they don't seem to include a zone file import option like the AWS Route53 GUI does.

The cli53 utility on the other hand does, but is written in Python and appears to have a series of pre-requisites to get going which I'm having troubles working out for Windows. I can find plenty of examples of setting it up under Linux but only one reference to a PowerShell example here, but it doesn't explain how to install cli53 in the first place.

The other option I'm exploring is to use the BIND to Amazon Route 53 Conversion Tool perl script to first convert the zone files to the Route53 CreateHostedZoneRequest XML format and then use the AWS New-R53HostedZone PowerShell cmdlet to import the zones.

After the zones have been imported I'll be looking at running a script to validate what has been created in Route53 matches with the existing nameserver prior to updating each domains nameserver records – I was planning on whipping something up using the new PS4.0 Resolve-DnsName cmdlet, but let me know if you have any better suggestions.

Any assistance would be greatly appreciated – thanks.

(By the way, I had more reference links in my post but ServerFault won't allow me to post more than 2 links being a new member; and for this same reason I also can't comment on Vasili's example in the other linked thread)

Best Answer

I already had Python installed on

c:\Python27

I installed PIP by downloading the get-pip.py program as described here:

http://pip.readthedocs.org/en/latest/installing.html

This installed the pip program into my

c:\Python27\Scripts 

folder. I could then run pip install:

c:\Python27\Scripts\pip.exe install cli53

Now that cli53 was installed, I created a file called ~/.boto with my credentials:

[Credentials]
aws_access_key_id = XXX
aws_secret_access_key = XXX

After which I could run cli53:

python c:\Python27\Scripts\cli53 list

INFO     HostedZones:
INFO       - ResourceRecordSetCount: 6
INFO         CallerReference: xxx
.
.
.
.
Related Topic