| Did this page help you? Yes No Tell us about it... |
This command applies to both EC2 Elastic IP addresses and VPC Elastic IP addresses.
For EC2 addresses: This command acquires an Elastic IP address for use with your AWS account. For more information about EC2 Elastic IP addresses, go to Instance Addressing in the Amazon Elastic Compute Cloud User Guide.
For VPC addresses: This command acquires an Elastic IP address for use with your VPC. For information about VPC addresses and how they differ from EC2 addresses, go to the Elastic IP Addresses in the Amazon Virtual Private Cloud User Guide.
The short version of this command is ec2allocaddr.
ec2-allocate-address [-d
domain]
| Name | Description | Required |
|---|---|---|
|
|
Set to Type: String Default: Address is standard (allocated to EC2). Valid Values: Condition: Required when allocating an address for use with VPC instances. Example: -d vpc |
Conditional |
| Option | Description |
|---|---|
|
|
Overrides the Region specified in the Default: The Example: |
|
|
Default: The Example: |
|
|
The private key to use when constructing requests to Amazon EC2. Default: The value of the Example: |
|
|
The X.509 certificate to use when constructing requests to Amazon EC2. Default: The value of the Example: |
|
|
Specifies a connection timeout (in seconds). Example: --connection-timeout 30 |
|
|
Specifies a request timeout (in seconds). Example: --request-timeout 45 |
|
|
Displays verbose output by showing the SOAP request and response on the command line. This is particularly useful if you are building tools to talk directly to our SOAP API. |
|
|
Displays column headers in the output. |
|
|
Shows empty columns as |
|
|
Do not display tags for tagged resources. |
|
|
Prints internal debugging information. This is useful to assist us when troubleshooting problems. |
|
|
Displays Help. |
|
|
If Example: |
The command returns a table that contains the following information:
Output type identifier ("ADDRESS")
Elastic IP address for use with your account
The address's domain (standard or vpc)
Allocation ID (an ID that AWS assigns to represent the allocation of the address for use with Amazon VPC; returned only for VPC Elastic IP addresses)
Amazon EC2 command line tools display errors on stderr.
This example returns an EC2 Elastic IP address for use with the account.
PROMPT>ec2-allocate-addressADDRESS 192.0.2.1
This example returns a VPC Elastic IP address for use with your VPC.
PROMPT>ec2-allocate-address -d vpcADDRESS 198.51.100.1 vpc eipalloc-5723d13e