Amazon EC2 Elastic IPs API

Operations for allocating and managing static IP addresses

Business capability
IT Infrastructure Management BC-600.50

Operations 6

GET /?Action=AllocateAddress Amazon EC2 Allocate an Elastic IP Address #
POST /?Action=AllocateAddress Allocate Address #
GET /?Action=AssociateAddress Amazon EC2 Associate an Elastic IP Address #
POST /?Action=AssociateAddress Associate Address #
GET /?Action=ReleaseAddress Amazon EC2 Release an Elastic IP Address #
POST /?Action=ReleaseAddress Release Address #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/amazon-ec2:amazon-ec2-elastic-ips-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

amazon-ec2-elastic-ips-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Amazon Ec2 Elastic IPs API
  version: '2016-11-15'
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  description: 'Operations tagged Elastic IPs across 2 of this provider''s published API definitions: amazon-ec2-openapi.yml, amazon-ec2-elastic-ips-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://ec2.{region}.amazonaws.com
  description: Amazon EC2 Regional Endpoint
  variables:
    region:
      default: us-east-1
      description: AWS Region
tags:
- name: Elastic IPs
  description: Operations for allocating and managing static IP addresses
paths:
  /?Action=AllocateAddress:
    get:
      operationId: allocateAddress
      summary: Amazon EC2 Allocate an Elastic IP Address
      description: Allocates an Elastic IP address to your AWS account. After you allocate the Elastic IP address you can associate it with an instance or network interface.
      tags:
      - Elastic IPs
      parameters:
      - name: Domain
        in: query
        description: Set to vpc to allocate the address for use with instances in a VPC
        schema:
          type: string
          enum:
          - vpc
          - standard
        example: vpc
      responses:
        '200':
          description: Successfully allocated address
        '400':
          description: Invalid request parameters
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      security:
      - sigv4Auth: []
    post:
      operationId: AllocateAddress
      summary: Allocate Address
      description: 'Allocates an Elastic IP address to your Amazon Web Services account. After you allocate the Elastic IP address you can associate it with an instance or network interface. After you release an Elastic IP address, it is released to the IP address pool and can be allocated to a different Amazon Web Services account. You can allocate an Elastic IP address from one of the following address pools: Amazon''s pool of IPv4 addresses Public IPv4 address range that you own and bring to your Amazon Web Services account using Bring Your Own IP Addresses (BYOIP) An IPv4 IPAM pool with an Amazon-provided or BYOIP public IPv4 address range IPv4 addresses from your on-premises network made available for use with an Outpost using a customer-owned IP address pool (CoIP pool) For more information, see Elastic IP Addresses in the Amazon EC2 User Guide. If you release an Elastic IP address, you might be able to recover it. You cannot recover an Elastic IP address that you released after it is allocated to another Amazon Web Services account. To attempt to recover an Elastic IP address that you released, specify it in this operation. You can allocate a carrier IP address which is a public IP address from'
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/AllocateAddressResult'
              example:
                PublicIp: 203.0.113.0
                AllocationId: eipalloc-64d5890a
                PublicIpv4Pool: amazon
                NetworkBorderGroup: us-east-1
                Domain: vpc
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
              - type: object
                required:
                - Action
                - Version
                properties:
                  Action:
                    type: string
                    const: AllocateAddress
                  Version:
                    type: string
                    const: '2016-11-15'
              - $ref: '#/components/schemas/AllocateAddressRequest'
      tags:
      - Elastic IPs
      security:
      - sigv4Auth: []
    servers:
    - url: https://ec2.{region}.amazonaws.com
      description: Amazon EC2 Regional Endpoint
      variables:
        region:
          default: us-east-1
          description: AWS Region
  /?Action=AssociateAddress:
    get:
      operationId: associateAddress
      summary: Amazon EC2 Associate an Elastic IP Address
      description: Associates an Elastic IP address with an instance or a network interface. This is an idempotent operation.
      tags:
      - Elastic IPs
      parameters:
      - name: AllocationId
        in: query
        description: The allocation ID for the Elastic IP address
        schema:
          type: string
        example: example-id-1234
      - name: InstanceId
        in: query
        description: The ID of the instance to associate with
        schema:
          type: string
        example: i-0abc123def456789
      - name: NetworkInterfaceId
        in: query
        description: The ID of the network interface
        schema:
          type: string
        example: example-id-1234
      responses:
        '200':
          description: Successfully associated address
        '400':
          description: Invalid request parameters
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      security:
      - sigv4Auth: []
    post:
      operationId: AssociateAddress
      summary: Associate Address
      description: Associates an Elastic IP address, or carrier IP address (for instances that are in subnets in Wavelength Zones) with an instance or a network interface. Before you can use an Elastic IP address, you must allocate it to your account. If the Elastic IP address is already associated with a different instance, it is disassociated from that instance and associated with the specified instance. If you associate an Elastic IP address with an instance that has an existing Elastic IP address, the existing address is disassociated from the instance, but remains allocated to your account. [Subnets in Wavelength Zones] You can associate an IP address from the telecommunication carrier to the instance or network interface. You cannot associate an Elastic IP address with an interface in a different network border group. This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error, and you may be charged for each time the Elastic IP address is remapped to the same instance. For more information, see the Elastic IP Addresses section of Amazon EC2 Pricing.
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/AssociateAddressResult'
              example:
                AssociationId: eipassoc-2bebb745
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
              - type: object
                required:
                - Action
                - Version
                properties:
                  Action:
                    type: string
                    const: AssociateAddress
                  Version:
                    type: string
                    const: '2016-11-15'
              - $ref: '#/components/schemas/AssociateAddressRequest'
            example:
              AllocationId: eipalloc-64d5890a
              InstanceId: i-0b263919b6498b123
      tags:
      - Elastic IPs
      security:
      - sigv4Auth: []
    servers:
    - url: https://ec2.{region}.amazonaws.com
      description: Amazon EC2 Regional Endpoint
      variables:
        region:
          default: us-east-1
          description: AWS Region
  /?Action=ReleaseAddress:
    get:
      operationId: releaseAddress
      summary: Amazon EC2 Release an Elastic IP Address
      description: Releases the specified Elastic IP address. After releasing an Elastic IP address, it is released to the IP address pool.
      tags:
      - Elastic IPs
      parameters:
      - name: AllocationId
        in: query
        description: The allocation ID of the Elastic IP address
        schema:
          type: string
        example: example-id-1234
      responses:
        '200':
          description: Successfully released address
        '400':
          description: Invalid request parameters
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      security:
      - sigv4Auth: []
    post:
      operationId: ReleaseAddress
      summary: Release Address
      description: Releases the specified Elastic IP address. [Default VPC] Releasing an Elastic IP address automatically disassociates it from any instance that it's associated with. Alternatively, you can disassociate an Elastic IP address without releasing it. [Nondefault VPC] You must disassociate the Elastic IP address before you can release it. Otherwise, Amazon EC2 returns an error (InvalidIPAddress.InUse). After releasing an Elastic IP address, it is released to the IP address pool. Be sure to update your DNS records and any servers or devices that communicate with the address. If you attempt to release an Elastic IP address that you already released, you'll get an AuthFailure error if the address is already allocated to another Amazon Web Services account. After you release an Elastic IP address, you might be able to recover it. For more information, see Release an Elastic IP address.
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                type: string
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
              - type: object
                required:
                - Action
                - Version
                properties:
                  Action:
                    type: string
                    const: ReleaseAddress
                  Version:
                    type: string
                    const: '2016-11-15'
              - $ref: '#/components/schemas/ReleaseAddressRequest'
            example:
              AllocationId: eipalloc-64d5890a
      tags:
      - Elastic IPs
      security:
      - sigv4Auth: []
    servers:
    - url: https://ec2.{region}.amazonaws.com
      description: Amazon EC2 Regional Endpoint
      variables:
        region:
          default: us-east-1
          description: AWS Region
components:
  schemas:
    AssociateAddressResult:
      type: object
      properties:
        AssociationId:
          type: string
          description: The ID that represents the association of the Elastic IP address with an instance.
    ReleaseAddressRequest:
      type: object
      properties:
        AllocationId:
          type: string
          description: The allocation ID. This parameter is required.
        PublicIp:
          type: string
          description: Deprecated.
        NetworkBorderGroup:
          type: string
          description: The set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses. If you provide an incorrect network border group, you receive an InvalidAddress.NotFound error.
        DryRun:
          type: boolean
          description: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
    AllocateAddressResult:
      type: object
      properties:
        AllocationId:
          type: string
          description: The ID that represents the allocation of the Elastic IP address.
        PublicIpv4Pool:
          type: string
          description: The ID of an address pool that you own.
        NetworkBorderGroup:
          type: string
          description: The set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.
        Domain:
          type: string
          enum:
          - vpc
          - standard
          description: The network (vpc).
        CustomerOwnedIp:
          type: string
          description: The customer-owned IP address.
        CustomerOwnedIpv4Pool:
          type: string
          description: The ID of the customer-owned address pool.
        CarrierIp:
          type: string
          description: The carrier IP address. Available only for network interfaces that reside in a subnet in a Wavelength Zone.
        PublicIp:
          type: string
          description: The Amazon-owned IP address. Not available when using an address pool that you own.
    Tag:
      type: object
      properties:
        Key:
          type: string
          description: 'The key of the tag. Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:.'
        Value:
          type: string
          description: 'The value of the tag. Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.'
    AssociateAddressRequest:
      type: object
      properties:
        AllocationId:
          type: string
          description: The allocation ID. This is required.
        InstanceId:
          type: string
          description: The ID of the instance. The instance must have exactly one attached network interface. You can specify either the instance ID or the network interface ID, but not both.
        PublicIp:
          type: string
          description: Deprecated.
        DryRun:
          type: boolean
          description: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
        NetworkInterfaceId:
          type: string
          description: The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID. You can specify either the instance ID or the network interface ID, but not both.
        PrivateIpAddress:
          type: string
          description: The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.
        AllowReassociation:
          type: boolean
          description: Reassociation is automatic, but you can specify false to ensure the operation fails if the Elastic IP address is already associated with another resource.
    AllocateAddressRequest:
      type: object
      properties:
        Domain:
          type: string
          enum:
          - vpc
          - standard
          description: The network (vpc).
        Address:
          type: string
          description: The Elastic IP address to recover or an IPv4 address from an address pool.
        PublicIpv4Pool:
          type: string
          description: The ID of an address pool that you own. Use this parameter to let Amazon EC2 select an address from the address pool. To specify a specific address from the address pool, use the Address parameter instead.
        NetworkBorderGroup:
          type: string
          description: A unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses. Use this parameter to limit the IP address to this location. IP addresses cannot move between network border groups.
        CustomerOwnedIpv4Pool:
          type: string
          description: The ID of a customer-owned address pool. Use this parameter to let Amazon EC2 select an address from the address pool. Alternatively, specify a specific address from the address pool.
        TagSpecifications:
          type: array
          items:
            $ref: '#/components/schemas/TagSpecification'
          description: The tags to assign to the Elastic IP address.
        IpamPoolId:
          type: string
          description: The ID of an IPAM pool which has an Amazon-provided or BYOIP public IPv4 CIDR provisioned to it. For more information, see Allocate sequential Elastic IP addresses from an IPAM pool in the Amazon VPC IPAM User Guide.
        DryRun:
          type: boolean
          description: Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
    TagSpecification:
      type: object
      properties:
        ResourceType:
          type: string
          enum:
          - capacity-reservation
          - client-vpn-endpoint
          - customer-gateway
          - carrier-gateway
          - coip-pool
          - declarative-policies-report
          - dedicated-host
          - dhcp-options
          - egress-only-internet-gateway
          - elastic-ip
          - elastic-gpu
          - export-image-task
          - export-instance-task
          - fleet
          - fpga-image
          - host-reservation
          - image
          - image-usage-report
          - import-image-task
          - import-snapshot-task
          - instance
          - instance-event-window
          - internet-gateway
          - ipam
          - ipam-pool
          - ipam-scope
          - ipv4pool-ec2
          - ipv6pool-ec2
          - key-pair
          - launch-template
          - local-gateway
          - local-gateway-route-table
          - local-gateway-virtual-interface
          - local-gateway-virtual-interface-group
          - local-gateway-route-table-vpc-association
          - local-gateway-route-table-virtual-interface-group-association
          - natgateway
          - network-acl
          - network-interface
          - network-insights-analysis
          - network-insights-path
          - network-insights-access-scope
          - network-insights-access-scope-analysis
          - outpost-lag
          - placement-group
          - prefix-list
          - replace-root-volume-task
          - reserved-instances
          - route-table
          - security-group
          - security-group-rule
          - service-link-virtual-interface
          - snapshot
          - spot-fleet-request
          - spot-instances-request
          - subnet
          - subnet-cidr-reservation
          - traffic-mirror-filter
          - traffic-mirror-session
          - traffic-mirror-target
          - transit-gateway
          - transit-gateway-attachment
          - transit-gateway-connect-peer
          - transit-gateway-multicast-domain
          - transit-gateway-policy-table
          - transit-gateway-metering-policy
          - transit-gateway-route-table
          - transit-gateway-route-table-announcement
          - volume
          - vpc
          - vpc-endpoint
          - vpc-endpoint-connection
          - vpc-endpoint-service
          - vpc-endpoint-service-permission
          - vpc-peering-connection
          - vpn-connection
          - vpn-gateway
          - vpc-flow-log
          - capacity-reservation-fleet
          - traffic-mirror-filter-rule
          - vpc-endpoint-connection-device-type
          - verified-access-instance
          - verified-access-group
          - verified-access-endpoint
          - verified-access-policy
          - verified-access-trust-provider
          - vpn-connection-device-type
          - vpc-block-public-access-exclusion
          - vpc-encryption-control
          - route-server
          - route-server-endpoint
          - route-server-peer
          - ipam-resource-discovery
          - ipam-resource-discovery-association
          - instance-connect-endpoint
          - verified-access-endpoint-target
          - ipam-external-resource-verification-token
          - capacity-block
          - mac-modification-task
          - ipam-prefix-list-resolver
          - ipam-policy
          - ipam-prefix-list-resolver-target
          - ipam-internet-registry-association
          - secondary-interface
          - secondary-network
          - secondary-subnet
          - capacity-manager-data-export
          - vpn-concentrator
          - ipam-pool-allocation
          - capacity-reservation-cancellation-quote
          - application-status-check
          - capacity-reservation-modification-quote
          description: The type of resource to tag on creation.
        Tags:
          type: array
          items:
            $ref: '#/components/schemas/Tag'
          description: The tags to apply to the resource.
  securitySchemes:
    sigv4Auth:
      type: apiKey
      name: Authorization
      in: header
      description: AWS Signature Version 4 authentication
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: ec2
externalDocs:
  description: Amazon EC2 API Reference
  url: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/
x-refined-from:
- amazon-ec2-openapi.yml
- amazon-ec2-elastic-ips-api-openapi.yml