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 Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • AWS Managed Database Observability: Monitoring DynamoDB, ElastiCache, and Redshift Beyond CloudWatch
  • Architecting Petabyte-Scale Hyperspectral Pipelines on AWS
  • Why SAP S/4HANA Landscape Design Impacts Cloud TCO More Than Compute Costs
  • We Went Multi-Cloud and Almost Drowned: Lessons From Running Across AWS, GCP, and Azure

Trending

  • Run Gemma 4 on Your Laptop: A Hands-On Guide to Google's Latest Open Multimodal LLM
  • When Perfect Data Breaks: The Journey from Data Quality to Data Observability
  • Building Enterprise-Grade Real-Time IoT Dashboards with Vue 3, MQTT, and Kafka
  • Ujorm3: A New Lightweight ORM for JavaBeans and Records
  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

By 
Eric Genesky user avatar
Eric Genesky
·
Jan. 20, 13 · Interview
Likes (0)
Comment
Save
Tweet
Share
22.9K 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.

Related

  • AWS Managed Database Observability: Monitoring DynamoDB, ElastiCache, and Redshift Beyond CloudWatch
  • Architecting Petabyte-Scale Hyperspectral Pipelines on AWS
  • Why SAP S/4HANA Landscape Design Impacts Cloud TCO More Than Compute Costs
  • We Went Multi-Cloud and Almost Drowned: Lessons From Running Across AWS, GCP, and Azure

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

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

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook