Skip to main content

Kodekloud - 100 Days of cloud (AWS) Day 10: Attach Elastic IP to EC2 Instance

Published 2 min readMarkdown

What Is an Elastic IP in AWS?

  • An Elastic IP (EIP) is a static public IPv4 address provided by AWS for cloud resources.

  • It is designed to support dynamic cloud environments.

  • Unlike default public IPs, an Elastic IP does not change when an instance is stopped or started.

  • The Elastic IP is owned by your AWS account, not permanently tied to a single instance.

  • It can be reassigned to another instance within the same AWS region when needed.

  • The IP address remains allocated until you explicitly release it.

  • Elastic IPs are commonly used when an application requires a fixed public IP address for access or integration.

Why Elastic IPs Are Used?

  • High Availability

  • Static IP for Critical Services

  • Disaster Recovery

How to use and reduce cost?

Free when:

  • Associated with a running instance

  • One EIP per instance

Charged when:

  • EIP is unassociated and not being used

  • EIP is attached to a stopped instance

  • Having multiple EIPs allocated per instance is bad practice.

TASK

Step 1: Login into the AWS environment using provided credentials.

Step 2: Go to EC2 section and select Network & Security section under that select Elastic IP. Then select the elastic ip. If not there then create one. While creating elastic ip select the instance name shown below..

Step 3: Select the mentioned Elastic IP and click on Action option. Elastic IP—→ Action —→ Attach Elastic IP address

Step 4: You should see the changed IP below after attaching Elastic IP

No comments yet. Be the first to comment.