I am running Serverless Offline and have configured environment variables based on stages.
provider:
name: aws
stage: ${opt:stage,'dev'}
environment:
MY_ENV_VAR: ${self:custom.myEnvVar.${self:provider.stage}}
custom:
stages:
- dev
- prod
myEnvVar:
dev: ${env:MY_ENV_VAR}
prod: ${ssm:MY_ENV_VAR}
When I run serverless offline start
, It is throwing warning about
A valid SSM parameter to satisfy the declaration 'ssm:MY_ENV_VAR' could not be found.
by default, the stage is dev
so why it is trying to access the SSM paramter store ?
Any help will be appreciated
Thanks