Skip to content

Instantly share code, notes, and snippets.

@macks
Created June 6, 2012 17:42
Show Gist options
  • Save macks/2883497 to your computer and use it in GitHub Desktop.
Save macks/2883497 to your computer and use it in GitHub Desktop.
Update Route53
#!/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