serverless-localstack
serverless-localstack copied to clipboard
ssm parameter not found, issue starts in version 0.4.20
I have a config similar to this:
service: apps
provider:
name: aws
runtime: nodejs8.10
stage: ${env:ENVIRONMENT}
timeout: 300
memorySize: 256
versionFunctions: false
region: ${env:AWS_REGION}
environment:
ENVIRONMENT: ${env:ENVIRONMENT}
MY_URL:${ssm:/path/to/entry}
custom:
localstack:
host: http://localhost
edgePort: 4566
endpoints:
SSM: http://localhost:4566
stages:
- local
functions:
example:
handler: functions/example/index.handler
plugins:
- serverless-localstack
In version 0.4.19 it will resolve the ssm value correctly, in version 0.4.20 it will not. I think it is related to this ticket: https://github.com/localstack/serverless-localstack/issues/53
The error is like this: A valid SSM parameter to satisfy the declaration 'ssm:/path/to/entry' could not be found.
Issue reproduced in my case as well and found this opened issue. I hope this gets attention soon.
Same here, in my case it gets the secrets from AWS, not Localstack
Hi @Psynbiotik, hi @evyros, hi @LaurentGoderre,
we recently discovered that the localstack-serverless plugin has issues resolving environment variables when using serverless v3 (it worked with v2 though).
We could pin down the issue and provided a fix. Could you check if your issue is resolved when using the localstack-serverless plugin version 1.1.0? 🙏
I have the same issue:
- I have 2 stages defined:
localandproduction. - Only
localis added tocustom.localstack.stageslist. - In production I have some
ssmparameters defined.
If I run sls wsgi --stage local, serverless-localstack is trying to resolve the production ssm parameters from LocalStack, so it fails.
Sorry for the late reply, updating to 1.1.0 worked for me
Hi @membrive,
can you confirm that you updated the serverless-localstack plugin to version 1.1.0 or greater? If you still encounter the issue, could you please create a new ticket, with a reproducible sample? 🙏
The original issue reported here seems to be resolved with the latest plugin version, we will close this ticket therefore.