Read on:

AWS for Beginners: Understanding AWS Terminologies: Part 1
AWS for Beginners: What is AWS EC2: Part 2
AWS for Beginners: AWS Compute Services: Part 3
Read More

An Elastic IP address (EIP) is a static IPv4 address designed for dynamic cloud computing. It is a public IP address that you can assign to an Amazon Elastic Compute Cloud (Amazon EC2) instance or to a network interface. Elastic IP addresses are associated with your AWS account, not with a specific instance or resource. This means that you can reassign the address to another instance or resource in your account if needed, without having to change the DNS configuration for your application or having to update your application’s configuration.

Protect Your Data with BDRSuite

Cost-Effective Backup Solution for VMs, Servers, Endpoints, Cloud VMs & SaaS applications. Supports On-Premise, Remote, Hybrid and Cloud Backup, including Disaster Recovery, Ransomware Defense & more!

You can use Elastic IP addresses to mask the failure of an instance or software by quickly remapping the address to another instance in your account. You can also use Elastic IP addresses to provide a stable IP address for your application, allowing you to change the underlying instances without having to update the IP addresses used to access your application.

Elastic IP charges

There is no additional charge for using Elastic IP addresses. However, you will be charged for any AWS resources used, such as Amazon EC2 instances or Amazon RDS DB instances, to which you have assigned Elastic IP addresses. Elastic IP does not incur charges, below are two key points to note:

  • Elastic IP is associated with an EC2 instance and associated EC2 instance is running
  • Only one Elastic IP address per EC2 instance

How to create an Elastic IP?

To create an Elastic IP address in AWS, you can follow these steps:

Download Banner

1. Sign in to the AWS Management Console.

2. Navigate to the Amazon EC2 dashboard.

AWS Elastic IP Address

3. In the left navigation pane, under NETWORK & SECURITY, click Elastic IPs.

AWS Elastic IP Address

4. Click Allocate Elastic IP address.

AWS Elastic IP Address

5. On the Allocate Elastic IP Address page, select the type of IP address you want to allocate. You can choose between IPv4 or IPv6.

6. Click Allocate.

AWS Elastic IP Address

7. The new Elastic IP address will be displayed in the list of Elastic IP addresses on the Elastic IPs page.

You can also create an Elastic IP address using the AWS Command Line Interface (CLI) or an AWS SDK.

How to attach to an instance?

1. Once you have created an Elastic IP address, you can assign it to an Amazon EC2 instance or a network interface by following these steps:

2. Select the Elastic IP address from the list on the Elastic IPs page.

AWS Elastic IP Address

3. Click the Actions dropdown menu and select Associate Elastic IP address.

AWS Elastic IP Address

4. On the Associate Elastic IP Address page, select the resource you want to associate the Elastic IP address with. You can choose between an Amazon EC2 instance or a network interface.

5. Click Associate.

The Elastic IP address will now be associated with the selected resource.

You can access the instance using the public Elastic IP which you have associated with the instance.

login as: ec2-user
Authenticating with public key “Vembu-Lenova”

__| __|_ )
_| ( / Amazon Linux 2 AMI
___|\___|___|

https://aws.amazon.com/amazon-linux-2/
[ec2-user@ip-10-0-23-193 ~]$ ip a
1: lo: mtu 65536 qdisc noqueue state UNKNOWN group defaul t qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: mtu 9001 qdisc pfifo_fast state UP gr oup default qlen 1000
link/ether 02:44:13:3f:32:21 brd ff:ff:ff:ff:ff:ff
inet 10.0.23.193/20 brd 10.0.31.255 scope global dynamic eth0
valid_lft 3499sec preferred_lft 3499sec
inet6 fe80::44:13ff:fe3f:3221/64 scope link
valid_lft forever preferred_lft forever
[ec2-user@ip-10-0-23-193 ~]$

How to delete the Elastic IP?

To delete an Elastic IP address in AWS, you can follow these steps:

1. Sign in to the AWS Management Console.

2. Navigate to the Amazon EC2 dashboard.

3. In the left navigation pane, under NETWORK & SECURITY, click Elastic IPs.

4. Select the Elastic IP address you want to delete from the list on the Elastic IPs page.

5. Click the Actions dropdown menu and select Release Elastic IP address.

AWS Elastic IP Address

6. In the Release Elastic IP Address dialog box, click Release to confirm that you want to delete the Elastic IP address.

AWS Elastic IP Address

Note that you can only delete an Elastic IP address if it is not associated with a resource, such as an Amazon EC2 instance or a network interface. If the Elastic IP address is associated with a resource, you will need to disassociate it first before you can delete it. If you want to disassociate the Elastic IP address from the resource, you can use the Disassociate Elastic IP address option in the Actions dropdown menu.

Caution – It is important to note that deleting an Elastic IP address is a permanent action and cannot be undone. Make sure that you no longer need the Elastic IP address before deleting it.

Uses of Elastic IP addresses:

Here are some potential advantages of using Elastic IP addresses:

Stable IP addresses:

Elastic IP addresses allow you to provide a stable IP address for your application, which can be useful if you need to update the underlying instances or resources without changing the IP addresses used to access your application.

Masking instance failures:

Elastic IP addresses can be used to mask the failure of an instance or software by quickly remapping the address to another instance in your account. This can help improve the availability and reliability of your application.

No additional charges:

There is no additional charge for using Elastic IP addresses in AWS, beyond the charges for the resources to which you have assigned the addresses.

Conclusion:

Elastic IP addresses can be a useful tool for certain scenarios, such as providing a stable IP address for your application or masking the failure of an instance, but it is important to consider both the potential benefits and drawbacks before deciding to use them in your AWS environment. It is important to consider the following potential drawbacks of using Elastic IP addresses:

Limited availability:

There is a limited number of Elastic IP addresses available per region in AWS, and you may not be able to obtain an Elastic IP address if they are all in use.

Possible charges for inactive addresses:

If you do not use an Elastic IP address for a period of time, AWS may charge you a small hourly fee to keep the address reserved for your use.

It is generally recommended to design your environment in a way that allows for dynamic DNS or endpoint configurations, as this allows for more flexibility and adaptability to changes in the environment. AWS Elastic IPs should only be used in exceptional cases where the use of dynamic DNS or endpoint configurations is not feasible.

AWS for Beginners: How to Protect AWS Security Tools: Part 4
AWS for Beginners: What is IAM (Identity and Access Management) and Best Practices: Part 5
AWS for Beginners: Provisioning IAM Users and Programmatic Access in AWS: Part 6
AWS for Beginners: Securing Root account using MFA: Part 7
AWS for Beginners: Amazon S3 Overview, Security and Best Practices : Part 8
AWS for Beginners: Creating and managing IAM groups: Part 9
AWS for Beginners: AWS Managed Policies and In-line Policies: Part 10
AWS for Beginners: Create and Attach a policy to an IAM User: Part 11
AWS for Beginners: How to Create a Customer Managed Policy: Part 12
AWS for Beginners: What are EC2 Placement groups: Part 13
AWS for Beginners: ALB vs NLB vs GLB – Which AWS Load Balancer Should You Choose: Part 14

Follow our Twitter and Facebook feeds for new releases, updates, insightful posts and more.

Rate this post