DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Assign a Fixed IP to an AWS EC2 Instance

Assign a Fixed IP to an AWS EC2 Instance

Eric Genesky user avatar by
Eric Genesky
·
Jan. 20, 13 · Interview
Like (0)
Save
Tweet
Share
21.74K Views

Join the DZone community and get the full member experience.

Join For Free

as described in my previous 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 elastic ip 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
  • screen shot 2012-12-11 at 12.57.17

  • allocate a new address
  • screen shot 2012-12-11 at 12.46.40

  • associate the address with a running instance
  • right click to associate the ip with an instance:
    screen shot 2012-12-11 at 12.48.44
    pick the instance to assign this ip to:
    screen shot 2012-12-11 at 12.48.22

  • note the ip being assigned to your instance
  • screen shot 2012-12-11 at 12.49.50

if you go to the ip address you were assigned then you see the home page of your server:
screen shot 2012-12-11 at 12.50.16

and the nicest thing is that if you stop and start your instance you will receive a new public dns but your instance is still assigned to the elastic ip address:
screen shot 2012-12-11 at 12.54.25

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.

AWS

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • How Elasticsearch Works
  • Strategies for Kubernetes Cluster Administrators: Understanding Pod Scheduling
  • Multi-Tenant Architecture for a SaaS Application on AWS
  • Unlock the Power of Terragrunt’s Hierarchy

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: