Open alxch- opened 4 years ago
@alxch- Can you please provide a sample project or repository in which this happens, I am unable to reproduce it currently.
Thank you for trying to reproduce.
I finally found where my issue was coming from. When referring to my SSM params, I was using ${ssm:/test_param~true}
(see the /
as a prefix). This is actually equivalent to ${ssm:test_param~true}
when querying the parameters from AWS. See this doc:
The systems treats both of the following parameters as root parameters.
/parameter-name
parameter-name
However, it seems that the plugin does not have the same behavior. It will try to find the exact parameter (with the /
prefix) from .env
, and complain because it cannot find it.
Ah, ok, I see that now. It's likely to do with the regex that reads the ssm name from the yaml file. I feel like the leading / was something I wasn't using or wasn't supported when I first wrote this. I'll see if I can add that support and get a fix released.
Thank you for trying to reproduce.
I finally found where my issue was coming from. When referring to my SSM params, I was using
${ssm:/test_param~true}
(see the/
as a prefix). This is actually equivalent to${ssm:test_param~true}
when querying the parameters from AWS. See this doc:The systems treats both of the following parameters as root parameters.
/parameter-name
parameter-name
However, it seems that the plugin does not have the same behavior. It will try to find the exact parameter (with the
/
prefix) from.env
, and complain because it cannot find it.
Hi @alxch- can you give me an example please?. I have the same problem here.
This is my configuration:
Offline SSM:
serverless-offline-ssm:
stages:
- local
ssm:
'greeting': 'Hi local'
Plugins:
plugins:
- serverless-stage-manager
- serverless-webpack
- serverless-dynamodb-local
- serverless-offline-ssm
- serverless-offline
Environment variables:
environment:
AWS_NODEJS_CONNECTION_REUSE_ENABLED: 1
GREETING: ${ssm:greeting~true}
I have the same issue using .env
file.
Thanks in the advance!
Hi,
I have an issue making the plugin work with serverless
1.72.0
. I just installed so I cannot confirm if it was working with a previous version, but I tested serverless1.69.0
with no success. I've tried setting my parameter both in theserverless-offline-ssm
section and in.env
file.When running
sls offline start --stage dev
, I get:package.json
:serverless.yml
:serverless.yml
:.env
file:Could it be a conflicting plugin? I've tried disabling them one by one but it did not solve the issue. Would you have any idea about why it does not work?
Thank you very much.