You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I have been trying to access ssm on serverless.ts file but I keep getting this error -
Serverless Warning --------------------------------------
A valid SSM parameter to satisfy the declaration 'ssm:/oath/to/ssm' could not be found.
It use to work fine on serverless.yml. I have looked at the definition file and I could not see any reference to ssm either, so I am assuming that it is not supported. If so, can you please confirm?
p.s: I can confirm that this ssm entry does exist on AWS and I can access it via AWS CLI.
Hi @appletreeat56 and thanks for submitting your issue.
Could you please share your serverless.ts service file content here ?
This repository translates Serverless framework internal validation constraints in Typescript definition. Anything supported by the framework is reflected here.
It's a shame that this is not documented. Only an example with serverless.yml is given and there is no mention of it doing "magic" in the background to produce IAM roles to allow SSM to be read from AWS.
I find it ridiculous that serverless.ts is being promoted as an official way for typescript app, but there is no documentation whatsoever.
Reacted by Patricio Ascencio Aravena, jeanyves-maisonnasse, Clive, filenda, Praneeth Yerrapragada, Paldeep Singh, TheLegendTubaGuy, Mr. Abdibdi, Dan Lovelace and Santiago Castro
So turns out this works fine, my issue was a spelling mistake.
environment: {AWS_NODEJS_CONNECTION_REUSE_ENABLED: "1",// TODO (Stephen): need to correct which stage the secret lives hard coding to live for now ${ssm:/${opt:stage, 'live'}APP_DB_INSTANCE_SECRET_ARN:
"${ssm:/live/secrets/rds/app-db-instance-secret-arn}",},
And my secret does exist with that name. Works fine no issues. Please could you show that you actually have the parameter store value setup. Also check the parameter and the region your serverless is deployed to is the same.
environment: {
AWS_NODEJS_CONNECTION_REUSE_ENABLED: "1",
// TODO (Stephen): need to correct which stage the secret lives hard coding to live for now ${ssm:/${opt:stage, 'live'}
APP_DB_INSTANCE_SECRET_ARN:
"${ssm:/live/secrets/rds/app-db-instance-secret-arn}",
},
Activity
fredericbarthelet commentedon Jan 23, 2022
Hi @appletreeat56 and thanks for submitting your issue.
Could you please share your
serverless.tsservice file content here ?This repository translates Serverless framework internal validation constraints in Typescript definition. Anything supported by the framework is reflected here.
appletreeat56 commentedon Jan 24, 2022
Hi Frédéric, Thanks for getting back on this issue. Below is the serverless.ts and
ssmcall is in theenvironmentfieldI am using this version of serverless in my
package.json-"@serverless/typescript": "^2.12.0"And this is my serveless version installed globally -
pascencio commentedon May 23, 2022
Hi everyone. There is any example to use SSM in serverless.ts? Thanks!
pascencio commentedon Jun 17, 2022
I have the same problem... There is some work around?
gruckion commentedon Sep 13, 2022
It's a shame that this is not documented. Only an example with serverless.yml is given and there is no mention of it doing "magic" in the background to produce IAM roles to allow SSM to be read from AWS.
DimmKirr commentedon Sep 22, 2022
I find it ridiculous that
serverless.tsis being promoted as an official way for typescript app, but there is no documentation whatsoever.gruckion commentedon Oct 7, 2022
So turns out this works fine, my issue was a spelling mistake.
And my secret does exist with that name. Works fine no issues. Please could you show that you actually have the parameter store value setup. Also check the parameter and the region your serverless is deployed to is the same.
Physicliar commentedon Feb 12, 2023
Above worked else for me even locally
kristijorgji commentedon Aug 8, 2024
Default value is not working anymore in last serverless version 4.1.19
Error
Failed to resolve variable