| « PreviousNext » | |
![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Describes one or more of your Elastic IP addresses.
An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide.
The short version of this command is ec2daddr.
ec2-describe-addresses
[
public_ip ... |
allocation_id ...]
[[--filter "name=value"] ...]
| Name | Description |
|---|---|
|
|
[EC2-Classic] One or more Elastic IP addresses. Type: String Default: Describes all your Elastic IP addresses. Required: No Example: 198.51.100.1 |
|
|
[EC2-VPC] One or more allocation IDs. Type: String Default: Describes all your Elastic IP addresses. Required: No Example: eipalloc-9558a4fc |
|
|
A filter for limiting the results. See the Supported Filters section for a list of supported filters. Use quotation marks if the value string has a space ("name=value example"). On a Windows system, use quotation marks even without a space in the value string ("name=value"). Type: String Default: Describes all your Elastic IP addresses, or only those you specified. Required: No Example: --filter "instance-id=i-1a2b3c4d" |
You can specify filters so that the response includes information for only certain Elastic IP addresses. For example, you can use a filter to specify that you're interested in addresses that have a specific tag. You can specify multiple values for a filter. The response includes information for an address only if it matches at least one of the filter values that you specified.
You can specify multiple filters; for example, specify addresses of a specific value that have a specific tag. The response includes information for an address only if it matches all the filters that you specified. If there's no match, no special message is returned, the response is simply empty.
You can use wildcards in a filter value. An asterisk (*) matches zero or more characters, and a question mark (?) matches exactly one character. You can escape special characters using a backslash (\) before the character. For example, a value of \*amazon\?\\ searches for the literal string *amazon?\.
The following are the available filters.
domainIndicates whether the address is for use in a VPC.
Type: String
Valid values: standard | vpc
instance-idThe instance the address is associated with (if any).
Type: String
public-ipThe Elastic IP address.
Type: String
allocation-idThe allocation ID for the address (VPC only).
Type: String
association-idThe association ID for the address (VPC only).
Type: String
network-interface-idThe network interface (if any) that the address is associated with (VPC only).
Type: String
network-interface-owner-idThe owner IID.
Type: String
private-ip-addressThe private IP address associated with the Elastic IP address (VPC only).
Type: String
| Option | Description |
|---|---|
|
|
Overrides the region specified by the Default: The value of the Example: |
|
|
The uniform resource locator (URL) of the Amazon EC2 web service entry point. Default: The value of the Example: |
|
|
The private key that identifies you to Amazon EC2. For more information, see Tell the Tools Who You Are. Default: The value of the Example: |
|
|
The X.509 certificate that identifies you to Amazon EC2. Default: The value of the Example: |
|
|
The access key ID associated with your AWS account. For more information, see Tell the Tools Who You Are. Default: The value of the Example: Note For more information, see the following section, Deprecated Options. |
|
|
The secret access key associated with your AWS account. Default: The value of the Example: Note For more information, see the following section, Deprecated Options. |
|
|
The AWS delegation token. Default: The value of the environment variable (if set). |
|
|
The connection timeout, in seconds. Example: |
|
|
The request timeout, in seconds. Example: |
|
|
Displays verbose output, including the API request and response on the command line. This is useful if you are building tools to talk directly to our Query API. |
|
|
Includes column headers in the command output. |
|
|
Shows empty columns as |
|
|
Omits tags for tagged resources. |
|
|
Displays internal debugging information. This can assist us when helping you troubleshooting problems. |
|
|
Displays usage information for the command. |
|
|
Reads arguments from standard input. This is useful when piping the output from one command to the input of another. Example: |
For a limited time, you can still use the private key and X.509 certificate instead of your access key ID and secret access key. However, we recommend that you start using your access key ID (-O, --aws-access-key) and secret access key (-W, --aws-secret-key) now, as the private key (-K, --private-key) and X.509 certificate (-C, --cert) won't be supported after the transition period elapses. For more information, see Tell the Tools Who You Are.
| Option | Description |
|---|---|
|
|
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: |
This command returns a table that contains the following information:
The ADDRESS identifier
The Elastic IP address
The ID of the instance to which the IP address is associated, if any
The domain of the Elastic IP address (standard or vpc)
[EC2-VPC] The allocation ID
[EC2-VPC] The association ID
[EC2-VPC] The private IP address associated with the Elastic IP address
Amazon EC2 command line tools display errors on stderr.
This example describes the Elastic IP address 192.0.2.1, which is assigned to instance i-f15ebb98 in EC2-Classic.
PROMPT>ec2-describe-addresses 192.0.2.1ADDRESS 192.0.2.1 i-f15ebb98 standard
This example describes the Elastic IP address with allocation ID eipalloc-282d9641, which is assigned to instance i-7a00642 in EC2-VPC.
PROMPT>ec2-describe-addresses eipalloc-9258a4fbType Address Instance Domain AllocationId AssociationId NetworkInterfaceID PrivateIP ADDRESS 203.0.113.0 i-7a00642e vpc eipalloc-282d9641 eipassoc-252d964c eni-d83388b1 10.0.0.14 4
This example describes all your Elastic IP addresses (for both EC2-Classic and your VPCs).
PROMPT>ec2-describe-addressesADDRESS 203.0.113.12 i-f15ebb98 standard ADDRESS 203.0.113.22 i-9e9da4e9 vpc eipalloc-9258a4fb eipassoc-0659a56f ADDRESS 203.0.113.32 vpc eipalloc-9558a4fc
This example describes your Elastic IP addresses for EC2-VPC.
PROMPT>ec2-describe-addresses --filter "allocation-id=*" -Hec2-describe-addresses -H Type Address Instance Domain AllocationId AssociationId NetworkInterfaceID PrivateIP ADDRESS 203.0.113.10 vpc eipalloc-1b5fe072 eipassoc-eb5fe082 eni-0689366f 10.0.1.35 ADDRESS 203.0.113.20 i-c844219c vpc eipalloc-b463dcdd eipassoc-d218a3bb eni-ea67dc83 10.0.0.174 ADDRESS 203.0.113.140 i-ba6a0d vpc eipalloc-1266dd7b eipassoc-39e15b50 eni-73e05a1a 10.0.0.85 ADDRESS 203.0.113.140 i-7a00642 vpc eipalloc-f38a359a eipassoc-1f239876 eni-d83388b1 10.0.0.12 ADDRESS 203.0.113.177 i-7a00642e vpc eipalloc-282d9641 eipassoc-252d964c eni-d83388b1 10.0.0.14
This example describes Elastic IP addresses associated with a particular private IP address in EC2-VPC.
PROMPT>ec2-describe-addresses --filter "private-ip-address=10.0.0.94"ADDRESS 203.0.113.155 vpc eipalloc-fdfc4394 eipassoc-52fa453b eni-66fc430f 10.0.0.94