FreeSBC:Cloud:Recovering an Elastic IP address

From TBwiki
Revision as of 06:04, 17 December 2020 by Serdar Civici (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

An Elastic IP address is a static IPv4 address designed for dynamic cloud computing. By using an Elastic IP address, you can mask the failure of an instance or software by rapidly remapping the address to another instance in your account. An Elastic IP address is allocated to your AWS account and is yours until you release it. If you have released your Elastic IP address, you might be able to recover it. The following rules apply:

  • You cannot recover an Elastic IP address if it has been allocated to another AWS account, or if it will result in your exceeding your Elastic IP address limit.
  • You cannot recover tags associated with an Elastic IP address.
  • You can recover an Elastic IP address using the Amazon EC2 API or a command-line tool only.

Recovering an Elastic IP address with AWS CLI

You need to install the AWS Command Line Interface (CLI).

1. For the latest version of the AWS CLI, use the following command block:

 $ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" 
 unzip awscliv2.zip 
 sudo ./aws/install 

2. Confirm the installation.

aws --version
aws-cli/2.1.12 Python/3.7.3 Linux/3.10.0-1127.18.2.el7.tb.x86_64 exe/x86_64.centos.7 prompt/off 

3. Type aws configure and press enter. Enter the following when prompted:

 AWS Access Key ID [None]: enter the Access Key Id from the credentials.csv file you downloaded in the Create an AWS IAM User part
Note: this should look something like AKIAPWINCOKAO3U4FWTN
AWS Secret Access Key [None]: enter the Secret Access Key from the credentials.csv file you downloaded in the Create an AWS IAM User part
Note: this should look something like 5dqQFBaGuPNf5z7NhFrgou4V5JJNaWPy1XFzBfX3
Default region name [None]: enter us-east-1
Default output format [None]: enter json

AWS CLI 1.png

4. Use the allocate-address AWS CLI command and specify the IP address using the --address parameter as follows.

 aws ec2 allocate-address --domain vpc --address 203.0.113.3 
Personal tools