Replies: 18 comments
-
@Lucasdsk can you please paste a complete output of e.g. |
Beta Was this translation helpful? Give feedback.
-
hey @medikoo , sure:
|
Beta Was this translation helpful? Give feedback.
-
@Lucasdsk you might want to update your serveless.yml with the latest update you have made; I believe you have also tried with - /my-path/my-path-env/* and it didn't work either |
Beta Was this translation helpful? Give feedback.
-
@Lucasdsk do you observe same issues when plugins are not used? Also please upgrade to latest version (v2.50.0) |
Beta Was this translation helpful? Give feedback.
-
@medikoo I've updated to the latest version. I could remove only the
|
Beta Was this translation helpful? Give feedback.
-
@Lucasdsk and when you do
You can ignore it. It should not appear when you have |
Beta Was this translation helpful? Give feedback.
-
@medikoo Yep, I see |
Beta Was this translation helpful? Give feedback.
-
@Lucasdsk have you tried using
directly in the code as opposed to process.env |
Beta Was this translation helpful? Give feedback.
-
yes @6ewis , I can do that. But the expected behavior as per serverless docs is that by declaring the envs in |
Beta Was this translation helpful? Give feedback.
-
It means they're resolved properly. What drives the conclusion they're not provided to lambdas in that form? Have you inspected the generated CloudFormation template. What values ares configured for env vars there? |
Beta Was this translation helpful? Give feedback.
-
@medikoo the values were set in the template:
|
Beta Was this translation helpful? Give feedback.
-
@Lucasdsk in that case it means that everything works fine a in a Framework. The template you see was deployed to AWS, and if after that in AWS Lambda you do not see configured environment variables it means it's an issue on AWS side (or maybe you do not confirm on lambdas that were actually updated/deployed ?) |
Beta Was this translation helpful? Give feedback.
-
They were deployed. I'm suspecting about a possible issue with some permission. I'll create a fresh lambda using a different account/user to check if I face the same issue. |
Beta Was this translation helpful? Give feedback.
-
hey @medikoo I've changed the approach to read the SSM envs using the aws-sdk. I have made some tests and it seems that serverless doesn't identify changes in the code neither in the serverless.yml even I doing that, and I believe that because of that the environment variables doesn't be updated. |
Beta Was this translation helpful? Give feedback.
-
@Lucasdsk Serverless CLI takes If you invoke |
Beta Was this translation helpful? Give feedback.
-
I see, it wasn't the case. I'll record a video testing it and as soon as I have it, I'll post the link here.
I see, it wasn't the case. I'll record a video testing it and as soon as I have it, I'll post the link here. |
Beta Was this translation helpful? Give feedback.
-
@medikoo @Lucasdsk you might need to tell SSM to decrypt for you by adding ~true
|
Beta Was this translation helpful? Give feedback.
-
I'm going to move it to discussions, and it doesn't seem to be a bug report |
Beta Was this translation helpful? Give feedback.
-
I'm trying to use SSM to populate the environment variables, but for some reason it only works when I run the function locally. When the lambda runs on AWS, the
process.env
doesn't have the added variables.I'm following the docs: https://www.serverless.com/framework/docs/providers/aws/guide/variables/#reference-variables-using-the-ssm-parameter-store
Also this blog post: https://www.serverless.com/blog/serverless-secrets-api-keys
serverless.yml
process.env content running the function locally
outputprocess.env content running the function on AWS
outputInstalled version
Beta Was this translation helpful? Give feedback.
All reactions