Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

260
Views
Accessing SSM variables with Serverless

I would like to use SSM Parameters in Serverless Variables.

Following the docs, I ran this command:

aws ssm put-parameter --name foo --value bar --type SecureString

And I added this to my serverless.yml:

custom:
  foo: ${ssm:foo}

When I deploy, I get this warning however:

Serverless Warning --------------------------------------

  A valid SSM parameter to satisfy the declaration 'ssm:foo' could not be found.

How do I access this variable? Thanks!

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

I needed to set the same region for both the serverless function, as well as the ssm variable assignment:

aws ssm put-parameter --name foo--value bar --type SecureString --region us-east-1
over 4 years ago · Santiago Trujillo Report

0

if the parameter is a SecureString, you need to add ~true after the path to the parameter on the serverless.yml file, as explained here: https://serverless.com/framework/docs/providers/aws/guide/variables#reference-variables-using-the-ssm-parameter-store

This will tell the framework to decrypt the value. Make sure that you have permissions to use the key used to encrypt the parameter.

over 4 years ago · Santiago Trujillo Report

0

Check your IAM policy. To get the parameters, the user doing the deployment needs access to SSM. This offers full access. See the docs to narrow it down a bit (ie: GetParameters, GetParameter).

  "Effect": "Allow",
  "Action": [
    "ssm:*"
  ],
  "Resource": [
    "*"
  ]
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!