<!-- llms-explorer concept facts · https://llms-explorer.com/tree/lambda-integration/ · pack 2026-10-15 · ~2958 tokens -->

# Lambda Integration

> Depth-first rabbithole dossier for Lambda Integration; source-anchored research pack.

Parent: [MongoDB Atlas AWS Networking](https://llms-explorer.com/tree/mongodb-atlas-aws-networking/) · 5 facets · 32 facts · page: https://llms-explorer.com/tree/lambda-integration/

## Definitions

- [low] Lambda checks to see if there is an available network resource (Hyperplane ENI) it can use to connect to. Sources: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#core`

## How it works

- [low] When you update a function to remove its VPC configuration, Lambda requires up to 20 minutes to delete the attached Hyperplane ENI. Sources: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#core`
- [low] By default, Lambda functions have access to the public internet, but when you attach your function to a VPC, it can only access resources available within that VPC. Sources: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#core`
- [low] You can still invoke your function successfully when it is attached to an Amazon VPC, even if you remove these permissions from your function's execution role. Sources: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#core`
- [low] Specifying the same subnets and security groups when you attach another function means that Lambda can share the network resources and avoid the need to create a new Hyperplane ENI. Sources: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#patterns`
- [low] Do not define a new client object each time you invoke a Lambda function, as this causes the driver to create a new database connection with each function call. Sources: https://www.mongodb.com/docs/atlas/manage-connections-aws-lambda.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#antipatterns`
- [low] Creating a new database connection with each Lambda function call can be expensive and can result in your application exceeding database connection limits. Sources: https://www.mongodb.com/docs/atlas/manage-connections-aws-lambda.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#antipatterns`

## Measurements and reference values

- [low] The amount of memory allocated to a Lambda function defaults to 128 MB and can be configured between 128 MB and 10,240 MB. Sources: https://www.mongodb.com/docs/atlas/manage-connections-aws-lambda.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#core`

## Problems, failure modes and limitations

- [low] For new functions, while Lambda is creating a Hyperplane ENI, your function remains in the Pending state and you cannot invoke it. Sources: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#core`
- [low] If the number of connections exceeds the limit, Lambda scales the number of ENIs automatically based on network traffic and concurrency requirements. Sources: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#core`
- [low] For existing functions, you cannot perform additional operations that target the function, such as creating versions or updating the function's code, but you can continue to invoke previous versions of the function. Sources: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#core`
- [low] Lambda functions cannot connect directly to a VPC with dedicated instance tenancy. Sources: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#antipatterns`
- [low] The next invocation attempt will fail, and the function re-enters the Pending state until Lambda completes the creation or allocation of a Hyperplane ENI. Sources: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#troubleshooting`

## Facts and statements

- [low] AWS Lambda passes information to functions through environment variables if you assign an execution role to the Lambda function. Sources: https://www.mongodb.com/docs/atlas/security/aws-iam-authentication.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#core`
- [low] If your handler takes a callback as its last argument, set the callbackWaitsForEmptyEventLoop property on the AWS Lambda Context object to false. Sources: https://www.mongodb.com/docs/atlas/manage-connections-aws-lambda.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#core`
- [low] Increase the memory allocated to a Lambda function to increase the amount of virtual CPU available and improve MongoDB driver performance. Sources: https://www.mongodb.com/docs/atlas/manage-connections-aws-lambda.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#core`
- [low] Set the AWS_STS_REGIONAL_ENDPOINTS and AWS_REGION environment variables for Lambda functions. Sources: https://www.mongodb.com/docs/atlas/manage-connections-aws-lambda.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#core`
- [low] Each Hyperplane ENI supports up to 65,000 connections/ports. Sources: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#core`
- [low] If a Lambda function remains idle for 14 days, Lambda reclaims any unused Hyperplane ENIs and sets the function state to Inactive. Sources: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#core`
- [low] Lambda only deletes the ENI if no other function or published function version is using that Hyperplane ENI. Sources: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#core`
- [low] To allow outbound IPv6 traffic in a VPC, all of the subnets that are connected to the function must be dual-stack subnets. Sources: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#core`
- [low] Lambda might delete and recreate ENIs to load balance network traffic across ENIs or to address issues found in ENI health-checks. Sources: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#core`
- [low] The Amazon EC2 permissions that you grant to your function's execution role are used by the Lambda service to attach your function to a VPC. Sources: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#core`
- [low] Lambda relies on permissions in the function execution role to delete the Hyperplane ENI. Sources: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#core`
- [low] The first time you attach a function to a VPC using a particular subnet and security group combination, Lambda creates a Hyperplane ENI. Sources: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#core`
- [low] Other functions in your account that use the same subnet and security group combination can also use this ENI. Sources: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#core`
- [low] Scale globally without limits using elastic clusters, bi-directional auto-scaling, independent operational/analytics/search nodes, and Amazon Bedrock integration on MongoDB Atlas on AWS. Sources: https://aws.amazon.com/marketplace/pp/prodview-pp445qepfdy34 — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#core`
- [low] The policy uses the lambda:SourceFunctionArn condition key, which only applies to API calls made by your function code during execution. Sources: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#patterns`
- [low] Lambda does not support outbound IPv6 connections for IPv6-only subnets in a VPC or for functions that are not connected to a VPC. Sources: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#antipatterns`
- [low] Granting Amazon EC2 permissions to your function's execution role implicitly grants these permissions to your function's code, allowing it to make these Amazon EC2 API calls. Sources: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#antipatterns`
- [low] Connecting a Lambda function to a public subnet does not give it internet access or a public IP address. Sources: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#troubleshooting`
- [low] If you delete the execution role before Lambda deletes the Hyperplane ENI, Lambda will not be able to delete the Hyperplane ENI. Sources: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/lambda-integration-aa13e41c30/rabbithole-synthesis.md#troubleshooting`

## Related concepts

- Lambda — is a part of Lambda Integration
- Integration — is a part of Lambda Integration
