I was surprised to find that AWS Lambda cannot directly reference records from Secrets Manager in environment, especially considering that ECS can reference records from both Parameter Store and Secrets Manager. There are two ways to overcome this limitation in Lambda:
- Use the AWS API.
- Use a Lambda Extension to retrieve secrets from Secrets Manager.