Sandbox egress
When a sandbox initiates access to a database, an internal API, or an Internet service, select the destination and the egress path first, and then configure the allowed scope and review the audit results.
Select a configuration based on egress requirements
|
Destination or requirement |
Egress path and configuration |
|
Only access Internet services from a sandbox, with no requirement for a fixed source IP address |
Uses the platform Internet egress. The egress IP address is not fixed. |
|
Access a database, cache, or internal API in a Virtual Private Cloud (VPC) in the same region |
Configure the VPC, vSwitch, and security group in the template. See Access resources in a VPC. |
|
Restrict the IP addresses, Classless Inter-Domain Routing (CIDR) blocks, or domain names that a sandbox can access |
Configure egress rules (allow rules and deny rules). See Network Access Control. |
|
A third-party service requires you to add a fixed source IP address to its whitelist |
Connect the sandbox to a VPC and disable the platform Internet egress of the template. Use a specified IP address for outbound traffic through an Internet NAT gateway, an elastic IP address (EIP), and Source Network Address Translation (SNAT). See Configure a fixed public IP for a sandbox instance. |
|
Query the destinations that a sandbox accesses and the policy decisions for them |
View egress audit logs in Simple Log Service (SLS). |
Configure and verify egress rules
If no VPC is specified, the sandbox uses the platform Internet egress by default, and the egress IP address is not fixed.
The egress rules and credential injection rules of a running sandbox can be updated. An update uses full replacement semantics, so you must submit both types of rules that you want to retain. See Update network configuration.
Whether an egress rule takes effect is determined by the result of application-layer requests that originate from the sandbox. For the verification method, see Network Access Control.