5

Serverless offers a function to access SSM.

${ssm:/parameter-path}

However, It seems only to allow access to SSM(parameter) in the same region.

Is there way to reference SSM in a different region?

Sometimes there are parameters globally used.

For those, I want to create them in a single region then share them accross multi-region.

Otherwise, I should redefine the same parameters in every region.

SangminKim
  • 8,358
  • 14
  • 69
  • 125
  • Documentation (https://www.serverless.com/framework/docs/providers/aws/guide/variables/) says you can add the region in brackets after SSM, but that doesn't work for me. I'm wondering if there's a version requirement or something? – aphenine Oct 22 '21 at 08:26

1 Answers1

0

The serverless documentation says that you add the region in brackets after ssm in the variable name: https://www.serverless.com/framework/docs/providers/aws/guide/variables/

e.g. ssm(eu-west-1)

However, that didn't work for me. Adding it with a dot . between the ssm and the region e.g. ssm.eu-west-1 did work and you can see it referenced in the pull request that created it.

https://github.com/serverless/serverless/pull/7625

This was in serverless 1.77.x, so I'm providing both answers in case the bracket notation is a serverless 2 thing.

aphenine
  • 1,156
  • 9
  • 18