This topic describes how to associate an elastic IP address (EIP) with an Elastic Compute Service (ECS) instance that is deployed in a virtual private cloud (VPC). After the ECS instance is associated with an EIP, the ECS instance can communicate with the Internet.

Prerequisites

An ECS instance is created. For more information, see Create an instance by using the wizard.

Procedure

  1. Log on to the Elastic IP Address console .
  2. In the top navigation bar, select the region where the EIP is created.
  3. On the Elastic IP Addresses page, find the EIP that you want to manage, and click Bind Resource in the Actions column.
  4. In the Associate EIP with Resource dialog box, set the following parameters and click OK.
    Parameter Description
    Network Type Select ECS Instance.
    Mode Select the mode in which you want to associate the EIP.
    You can select only NAT Mode. In NAT mode:
    • The private IP address and public IP address of the ECS instance with which the EIP is associated are available for use.
    • The EIP is not displayed in the operating system. To query the EIP of the ECS instance, call the DescribeInstances operation. For more information, see DescribeInstances.
    • The EIP does not support protocols that are managed by NAT application layer gateways (ALGs), such as H.323, Session Initiation Protocol (SIP), Domain Network System (DNS), and Real Time Streaming Protocol (RTSP).
    Select an instance to associate. Select the ECS instance with which you want to associate the EIP.
    Make sure that the following requirements are met:
    • The ECS instance is deployed in a VPC.
    • The ECS instance is in the Running or Stopped state.
    • The ECS instance and the EIP are created in the same region.
    • The ECS instance is not assigned a static public IP address or associated with an EIP.
      Note Each ECS instance can be associated only with one EIP.