Cross peering connectivity is allowed by Lambda

Security & Compliance

AWS Lambda function has the capability to establish peering connections between Virtual Private Clouds (VPCs). This feature allows Lambda functions to access resources in different VPCs. However, if not configured properly, it can lead to a potential security risk, as it could enable unauthorized access to resources across different VPCs. Cross peering connectivity should be avoided unless explicitly required by the application architecture, and only authorized IAM roles should be granted permission to establish such connections.


The remediation steps to ensure that cross peering connectivity is not allowed by Lambda are as follows:

  1. Open the Lambda function in the AWS Management Console.
  2. Click on the "Configuration" tab and then select "VPC".
  3. Identify the VPC and subnets associated with the Lambda function.
  4. Click on the VPC ID to open the VPC in the VPC Dashboard.
  5. Select the "Peering Connections" option from the left-hand menu.
  6. Check if there are any VPC peering connections listed.
  7. If there are any peering connections, review the configuration of each and determine if they should be removed or modified.
  8. If necessary, remove the peering connections or modify their configuration to restrict connectivity to only the necessary resources.
  9. Test the function to confirm that it is no longer able to communicate with resources in other VPCs via peering connections.
  10. Repeat this process for all Lambda functions in the account that are associated with VPCs.
  11. Regularly monitor the VPC peering connections to ensure that no new connections are established without proper authorization and review.
  12. Implement a governance process to enforce this policy and ensure that all future Lambda functions are deployed with the appropriate VPC and security group configurations.
Enforced Resources
Note: Remediation steps provided by Lightlytics are meant to be suggestions and guidelines only. It is crucial to thoroughly verify and test any remediation steps before applying them to production environments. Each organization's infrastructure and security needs may differ, and blindly applying suggested remediation steps without proper testing could potentially cause unforeseen issues or vulnerabilities. Therefore, it is strongly recommended that you validate and customize any remediation steps to meet your organization's specific requirements and ensure that they align with your security policies and best practices.