nutsiepully
nutsiepully

Reputation: 1106

Amazon EBS EC2 instance IP changed on restart

I am running an EBS backed Amazon EC2 Linux instance. For some maintenance purposes I shutdown the machine and started it again. However, my machine IP has changed now. This affects my services since the server won't be reachable now.

Can this be repaired. Can I assign the same IP to the machine again?

Any help is really appreciated.

Thanks.

P.S - The maintenance was that I shut down the machine so I could create and AMI out of it to share it with another user.

Upvotes: 2

Views: 1843

Answers (1)

David
David

Reputation: 20063

You should give the EC2 box an Elastic IP, otherwise when you restart the machine it'll have a new IP. You can reuse this IP on different EC2 boxes but it will mean you have a constant IP to reference so say you lose your EC2 box and have to restore again from a EBS, it will still have the allocated static IP.

Upvotes: 6

Related Questions