Associates an elastic IP address with an instance. If the IP address is currently assigned to another instance, the IP address is assigned to the new instance. This is an idempotent operation. If you enter it more than once, Amazon EC2 does not return an error.
The instance to which the IP address is assigned.
The IP address that you are assigning to the instance.
Amazon EC2 returns a table that contains the following information:
Output type identifier ("ADDRESS")
Elastic IP address that you are assigning to the instance
Instance to which the IP address is assigned
Amazon EC2 displays errors on
This example assigns the
18.104.22.168 IP address to the
ec2-associate-address -i i-43a4412a 22.214.171.124
ADDRESS 126.96.36.199 i-43a4412a