Outbound API calls use inconsistent IPs in AEMaaCS

In Adobe Experience Manager as a Cloud Service (AEMaaCS), outbound HTTP requests from custom Sling Servlets using Apache HttpClient fail to reach external endpoints due to mismatched egress IP addresses. To resolve this issue, configure advanced networking and update your HTTP client settings.

Description description

Environment

Adobe Experience Manager as a Cloud Service (AEMaaCS)

Issue/Symptoms

  • Outbound HTTP requests from custom Sling Servlets using Apache HttpClient fail to reach external endpoints.
  • The IP address observed by the external API vendor differs from the one resolved via DNS for your environment’s domain.
  • Egress IP addresses vary between Author and Publish instances.
  • A dedicated egress IP is already set through Cloud Manager, but additional configuration is required to ensure proper connectivity.

Resolution resolution

To resolve the issue, follow these steps:

  1. Enable advanced networking at the environment level:

    1. Go to the Configure advanced networking tab in your environment settings.
    2. Enable options such as flexible port egress, dedicated egress IP address, or VPN.
    3. Leave optional fields like Port forwards  and Non-proxy hosts empty unless explicitly required.
  2. If outbound HTTP requests are made from custom Sling Servlets on the server side, ensure that Apache HttpClient uses system properties by invoking `.useSystemProperties()` during HttpClient initialization.

  3. After enabling advanced networking, confirm that outbound requests from both Author and Publish instances use the dedicated egress IP address configured in Cloud Manager.

  4. Perform test API calls from both Author and Publish environments to validate successful communication with the external service.

recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f