3

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)

1

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
.
.
.
.
  • Awesome. Here's a few bits I'll add to clarify for anyone else; 1) The ~/.boto file is actually %userprofile%\.boto on Windows, and 2) To install pip behind a proxy follow the instructions here: stackoverflow.com/questions/11726881/… – pavlos Jun 3 '14 at 8:44
  • 1
    Also to add, if your proxy performs SSL inspection using internal CAs then in addition to setting the system environment variables http_proxy=user:pass@proxy:port and https_proxy=user:pass@proxy:port you will need to update the boto cacerts.txt file to append the internal CAs at the end (in Base64 encoded cer/pem/crt format). From your Python root directory this file is located under \Lib\site-packages\boto\cacerts\ – pavlos Jun 4 '14 at 3:28
2

cli53 has since been rewritten in go, so is installable as a single executable available for Windows now: https://github.com/barnybug/cli53/releases/latest/

0

Not a windows person but you could install Virtualbox and then run cli53 inside a Linux VM on Windows.

  • Thanks but I'm trying to run it on Windows so I can include all necessary functionality within a single PowerShell script - otherwise I would just spin up a Linux instance in AWS. – pavlos Jun 3 '14 at 2:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.