| by Arround The Web | No comments

How to Delete Elastic IP in AWS

In AWS EC2 service the IP address for the instance changes every time the server restarts or reboots. If the user wants to keep the same IP address, for that AWS provides the service of the Elastic IP address. The elastic IP can be associated with the Amazon EC2 instance and it can be released from the instance as well. This post will discuss the process of releasing or deleting the elastic IP address of the AWS EC2 instance.

This post contains the following sections:

Let’s start with how to delete Elastic IP in AWS:

Delete Elastic IP in AWS Using AWS Console

Elastic IP in AWS can be deleted using the AWS management console by clicking on the EC2 service from the compute section:

On the EC2 console, scroll down the left panel and click on the “Elastic IP” section. After that select the Elastic IP and expand the “Actions” tab to click on the “Release Elastic IP address” button:

After that, verify the release by clicking on the “Release” button on the window:

The elastic IP has been released and no longer appear on the list:

You have successfully deleted an elastic IP in AWS using the management console. The second method to delete Elastic IP is through AWS CLI, and it is explained in the next section:

Delete Elastic IP in AWS Using AWS CLI

To delete an Elastic IP using AWS CLI, simply select the Elastic IP to be deleted and locate its “Allocation ID” from the summary of the Elastic IP:

After that, configure the AWS CLI using the following command:

aws configure

Running the above command will prompt you to provide the Access and Secret keys with region and format. After providing these credentials, the AWS CLI will be configured:

After configuring the AWS CLI, use the following command and paste the copied “Allocation ID” from the console to delete the Elastic IP address:

aws ec2 release-address --allocation-id eipalloc-07300976091c9ca52

The following is the syntax of the above command:

aws ec2 release-address --allocation-id

Running this command will delete the Elastic IP in AWS:

The selected Elastic IP is deleted from the EIP console page using AWS CLI:

You have successfully deleted the Elastic IP address using the AWS CLI:

Conclusion

The user can delete an Elastic IP address using the AWS console and AWS CLI. On the management console, locate the EC2 service and click on it. After that, select the Elastic IP section and click on the “Actions” button to release the Elastic IP. The user can also delete the Elastic IP using AWS CLI. It can be done by writing a “release” command with the “Allocation ID” on the command prompt.

Share Button

Source: linuxhint.com

Leave a Reply