If you are using a dns service provider with dynamic dns support, and using a gentoo based EC2 AMI, then you may find this script to be useful. It can update the IP address for a specified domain name whenver the gentoo AMI is booted.
To use this script, just extract the file, and place ec2.conf under /etc/conf.d and rename it as ec2, then move file ec2 to /etc/init.d
Before you can use it, you have to set some parameters in file /etc/conf.d/ec2, please consult the comments in that file.
In order to register IP address whenever the AMI is getting booted, a final step is needed:
rc-update add ec2 default