1 Answer
- Newest
- Most votes
- Most comments
1
Hi,
When running in Lambda, you don't want to use env var for access keys and secret keys: it is a bad practice.
You rather want to use the Lambda execution role and grant it the service credentials needed by your use case: https://docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html
This article explains very well how to use the execution role: https://medium.com/aws-lambda-serverless-developer-guide-with-hands/aws-lambda-permissions-execution-role-and-resource-based-policies-be2e325998fc
Best,
Didier
Relevant content
- Accepted Answerasked 7 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 3 years ago