. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| Server IP : 52.223.31.75 / Your IP : 172.31.32.98 [ Web Server : Apache/2.4.66 () OpenSSL/1.0.2k-fips PHP/7.4.33 System : Linux ip-172-31-14-81.eu-central-1.compute.internal 4.14.281-212.502.amzn2.x86_64 #1 SMP Thu May 26 09:52:17 UTC 2022 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE Domains : 4 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /lib/python2.7/site-packages/awscli/examples/ec2/ |
Upload File : |
**Example 1: To allocate an Elastic IP address for EC2-Classic**
The following ``allocate-address`` example allocates an Elastic IP address to use with an instance in EC2-Classic. ::
aws ec2 allocate-address
Output::
{
"PublicIp": "198.51.100.0",
"PublicIpv4Pool": "amazon",
"Domain": "standard"
}
**Example 2: To allocate an Elastic IP address for EC2-VPC**
The following ``allocate-address`` example allocates an Elastic IP address to use with an instance in a VPC. ::
aws ec2 allocate-address \
--domain vpc \
--network-border-group us-west-2-lax-1
Output::
{
"PublicIp": "70.224.234.241",
"AllocationId": "eipalloc-02463d08ceEXAMPLE",
"PublicIpv4Pool": "amazon",
"NetworkBorderGroup": "us-west-2-lax-1",
"Domain": "vpc"
}