Policy Agent - Custom VPC Endpoint Hostname Configuration

Custom vpc endpoint hostname configuration

The Policy Agent uses default endpoint hostnames to communicate with other AWS services (for example, secretsmanager.amazonaws.com). This configuration will only work in VPCs where Amazon-provided DNS is available (default VPC configuration with private DNS option enabled for the endpoint). If your VPC uses custom DNS, follow the instructions below to configure the Policy Agent Lambda to use custom endpoint hostnames.

Identify DNS Hostnames

To identify DNS hostnames:

  1. From AWS console, select VPC > Endpoints.

  2. Select Secrets Manager endpoint from the list of endpoints.

  3. Under Details > DNS Names, note the private endpoint DNS names adding https:// at the beginning of the endpoint name.

    For example, https://vpce-1234-4pzomrye.kms.us-west-1.vpce.amazonaws.com

  4. Note down DNS names for the KMS and Lambda endpoints:

    AWS_SECRETSMANAGER_ENDPOINT: https://_________________

    AWS_KMS_ENDPOINT: https://_________________

    AWS_LAMBDA_ENDPOINT: https://_________________

Update the Policy Agent Lambda configuration

To update policy agent lambda configuration:

  1. From the AWS console, navigate to Lambda, and select the Policy Agent Lambda function.

  2. Select the Configuration section and choose Environment variables.

  3. Select Edit and add the following environment variables with the corresponding endpoint URLs recorded in steps 3-4:

    ParametersValue
    AWS_SECRETSMANAGER_ENDPOINT_URL<AWS_SECRETS_ENDPOINT>
    AWS_KMS_ENDPOINT_URL<AWS KMS ENDPOINT>
    AWS_LAMBDA_ENDPOINT_URL<AWS LAMBDA ENDPOINT>
  4. Click Save and Run the Lambda. The Lambda will now use endpoints you have just configured.


Last modified : November 27, 2025