-
-
-
-
-
If your backend service works in a VPC instance, you must authorize the API gateway to open
corresponding APIs. The process of creating an API is as follows:
1 Authorize and bind a VPC instance
In a VPC environment, you must authorize the API gateway so that it can access the service in your
VPC. During authorization, you must specify the resource and port which the API gateway can access,
such as port 443 of Server Load Balancer and port 80 of ECS.
After the authorization succeeds, the API gateway accesses resources in the VPC instance
through the intranet.
This authorization is only used for the API gateway to access corresponding backend
resources.
The API gateway cannot access unauthorized resources or ports.
For example, if only port 80 of Server Load Balancer 1 in VPC 1 is authorized to the API gateway, the
API gateway can only access this port.
1.1 Prepare for a VPC environment
(1) Buy Server Load Balancer and ECS instances in the VPC environment and build the service. For
more information, see
VPC user manual
.
(2) Query the VPC information. Prepare the following VPC information:
VPC ID: Indicates the ID of the VPC where your backend service is located.
Instance ID: Indicates the ID of the instance of your backend service. The instance can be an
API Gateway
User Guide for Providers
29