Created
June 6, 2012 17:42
-
-
Save macks/2883497 to your computer and use it in GitHub Desktop.
Update Route53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cli53=$HOME/bin/cli53 | |
. $HOME/.ec2/env | |
ec2-describe-instances | \ | |
perl -lane '/^INSTANCE/ and $name = $F[3]; /^TAG/ and $F[3] eq "Name" and print "$F[4] CNAME $name"' | \ | |
xargs -n 3 -r $cli53 rrcreate aws.example.com --ttl 60 --replace |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment