Amazon EC2 Elastic IPs API

Operations for allocating and managing static IP addresses

GitHub OpenAPI
Business capability
IT Infrastructure Management BC-600.50

Operations 3

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /?Action=AllocateAddress Allocate an Elastic IP address · Allocate Address #
Ask an LLM
“How do I get a public IPv4 address for my EC2 instance?”
“Can I allocate an Elastic IP from a customer-owned IP pool?”
Tell an agent
Allocate an Elastic IP address in the {domain} domain.
Allocate an Elastic IP from public IPv4 pool {pool}.
POST /?Action=ReleaseAddress Release an Elastic IP address · Release Address #
Ask an LLM
“How do I release an Elastic IP address back to the pool?”
“What happens to an Elastic IP when I release it?”
Tell an agent destructive · confirm first
Release Elastic IP address {allocation}.
Release the Elastic IP {ip} in network border group {group}.
POST /?Action=AssociateAddress Associate an Elastic IP with an instance · Associate Address #
Ask an LLM
“How do I attach an Elastic IP to an EC2 instance?”
“Can I reassign an Elastic IP that is already attached to another instance?”
Tell an agent
Associate Elastic IP {allocationId} with instance {instanceId}.
Try associating Elastic IP {allocationId} with instance {instanceId} without making the change.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. 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.1.0
info:
  title: Amazon Elastic Compute Cloud Elastic Ips API
  version: '2016-11-15'
  description: Generated from AWS's published Smithy model for Amazon Elastic Compute Cloud. 3 operation(s).
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    identifier: Apache-2.0
    url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://ec2.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /?Action=AllocateAddress:
    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
  /?Action=ReleaseAddress:
    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
  /?Action=AssociateAddress:
    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
components:
  securitySchemes:
    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
  schemas:
    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.
    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.
    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.
    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.
    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.'
    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.
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/ec2/service/2016-11-15/ec2-2016-11-15.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)