overriding AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY in .env variables #1116
Replies: 3 comments 2 replies
-
Hi! These environment variables are always defined automatically on AWS Lambda: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime So the ones from .env will never be loaded. If you want to add permissions to code running in Lambda, you should do that on the Lambda role itself. |
Beta Was this translation helpful? Give feedback.
-
Thanks for reply, I don't understand how to add permission to my Lambda. if you mean that I should add permission roles to bref-cli user I already added permissions like
but nothing changes. please tell me how should I do that? thanks again. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot, I solved the issue that was I was trying to connect to AWS with credential which was wrong. |
Beta Was this translation helpful? Give feedback.
-
Description:
Hello,
I'm deploying a lumen project and have a problem with overriding AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY in
.env
variables. so it causes issues like not connecting to DynamoDB.When I hardcode my variables such as AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, everything is going to ok.
it seems there is something wrong with
vlucas/phpdotenv
package. because, I created a sample php project and I also had the same problem there.How to reproduce:
Serverless version:
Bref Version:
Beta Was this translation helpful? Give feedback.
All reactions