Assign a Fixed IP to an AWS EC2 Instance
Join the DZone community and get the full member experience.Join For Free
as described in my
post the ip (and dns) of your running ec2 ami will change after a
reboot of that instance. of course this makes it very hard to make your
applications on that machine available for the outside world, like in
this case our wordpress blog. that is where
comes to the rescue. with this feature you can assign a static ip to your instance.
assign one to your application as follows:
- click on the elastic ips link in the aws console
- allocate a new address
- associate the address with a running instance
- note the ip being assigned to your instance
one important note: as long as an elastic ip address is associated with a running instance, there is no charge for it. however an address that is not associated with a running instance costs $0.01/hour. this prevents users from ‘reserving’ addresses while they are not being used.
Opinions expressed by DZone contributors are their own.