Skip to content

Instantly share code, notes, and snippets.

@alkuzad
Created January 4, 2022 17:11
Show Gist options
  • Save alkuzad/9724effaccf85ebb22405c6b3f56ac37 to your computer and use it in GitHub Desktop.
Save alkuzad/9724effaccf85ebb22405c6b3f56ac37 to your computer and use it in GitHub Desktop.
all ssm parameters
def ssm_parameters():
ssm_path = "/example/path/" # / at the end
ssm = boto3.client('ssm', region_name='eu-west-1')
parameters = ssm.get_parameters_by_path(Path=ssm_path, WithDecryption=True)[
'Parameters'
]
return {x['Name'].replace(ssm_path, ""): x['Value'] for x in parameters}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment