route53copy
copies resource records from one AWS account to another (or inside the same account). It
creates a ChangeResourceRecordSet
with UPSERT
for all ResourceRecord
s of
the source account and sends it to the destination account.
The top-level SOA
and NS
are not included in the change set since they
should already exist in the destination account.
The destination domain must already exist in the destination account and AWS Named Profiles must be configured for both the source account and the destination account.
$ brew tap andersjanmyr/tap
$ brew install route53
route53copy
is a single binary. Install it by right-clicking and Save as...
or with curl
.
# OS X
$ curl -L https://github.com/andersjanmyr/route53copy/releases/download/v1.1.1/route53copy-osx \
> /usr/local/bin/route53copy
# Linux
$ curl -L https://github.com/andersjanmyr/route53copy/releases/download/v1.1.1/route53copy-linux \
> /usr/local/bin/route53copy
# Make executable
$ chmod a+x /usr/local/bin/route53copy
$ route53copy --help
route53copy [options] <source_profile> <dest_profile> <srcDomain> [destDomain]
-dry
Don't make any changes
-exclude value
Comma separated list of DNS entries types of the base domain to be ignored. If not set SOA and NS will be excluded.
-help
Show help text
-hosted-zones string
Comma separated lsit of hosted-zones for accounts with access limmited to specific hosted zones
-show-changes
Show change list
-version
Show version
$ route53copy -exclude "SOA,NS,MX" aws_profile1 aws_profile2 example.com foobar.com
Skipping example.com. NS
Skipping example.com. SOA
Skipping example.com. MX
Number of Records: 55
52 records in 'example.com' are copied from aws_profile1-dev to aws_profile2
{
Comment: "Importing ALL records from aws_profile",
Id: "/change/C3QI8LAP4H5G9",
Status: "PENDING",
SubmittedAt: 2015-09-25 08:47:19.908 +0000 UTC
}
A list of changes are in the RELEASE_NOTES.