AWS Lambda functions are not configured to access resources in a Virtual Private Cloud (VPC) which may cause public exposure of private data.
In AWS Console -
In Terraform -
References:
https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_function#vpc_config