How to Enable Cost-Effective Internet Access for AWS Lambda in a VPC?
I have an AWS Lambda function written in Go that needs to connect to an RDS and an ElastiCache instance, both of which are in a VPC. To achieve this, I placed the Lambda function in an allowed security group and a public subnet. This setup works, and the Lambda function can connect to both RDS and ElastiCache.