I'm trying to do use ssm in the serverless.ts file and it is not working.
const serverlessConfiguration: AWS = {
service: "data-lineage",
frameworkVersion: "2",
custom: {
webpack: {
webpackConfig: "./webpack.config.js",
includeModules: true,
},
stages: ["dev", "staging", "prod"],
region: "${opt:region, self:provider.region}",
stage: "${opt:stage, self:provider.stage}",
dburl: {
dev: config.transactionalMongoUrl,
staging:
"${ssm:/some/some2/staging/dburl}",
prod:
"${ssm:/some/some2/prod/dburl}",
},
.... ... ..
environment: {
AWS_NODEJS_CONNECTION_REUSE_ENABLED: "1",
DB_URL:
"${self:custom.dburl.${self:provider.stage}}",
When I deploy my lambda, it is not working and the value of the process.env.DB_URL is undefined.
Anyone can help with a hint how can I use SSM in the serverless.ts