Nested variables with SSM

Hello!

Can we use nested variables inside AWS SSM Parameters references?

Something like this:

custom:
  stage: ${opt:stage, self:provider.stage}

environment:
    RDS_ENDPOINT: ${ssm:/rds/${self.custom.stage}-db/ENDPOINT}

I’m getting Invalid variable type while building.

My environment config is:

     Operating System:          linux
     Node Version:              16.3.0
     Framework Version:         2.48.0 (local)
     Plugin Version:            5.4.1
     SDK Version:               4.2.3
     Components Version:        3.12.0

Thanks!

colon comes after self. try below given code:

RDS_ENDPOINT: ${ssm:/rds/${self:custom.stage}-db/ENDPOINT}

LOL

Thanks @muqadar-ali :crazy_face:

1 Like