Skip to content

Associate elastic IP with the current EC2 instance

License

Notifications You must be signed in to change notification settings

sensiblecodeio/associate-eip

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Single binary to associate an Elastic IP address with an instance

Fed up with using the web console to change an Elastic IP?

If you have a machine pointed to by an Elastic IP address, and you want to automatically update that Elastic IP address with minimal fuss, this program can help you achieve it.

The goal is to associate the Elastic IP address with the machine in a secure manner without any human contact, just through the configuration of the machine. This is useful for making it possible to replace the machine trivially.

Usage

AWS has the notion of "user data" associated with an instance. Operating systems ship with cloud-init which read the user data and take action.

AWS also has a notion of a "machine role", which allowed a machine to take specific actions. In this case, the machine role needs to have the capability to associate an address with itself.

Given these facts, one can

curl -sSOL https://github.com/pwaller/associate-eip/releases/download/v0.2/associate-eip
associate-eip --ip 54.12.34.56

About

Associate elastic IP with the current EC2 instance

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 83.4%
  • Dockerfile 11.6%
  • Makefile 5.0%