Created
January 4, 2022 17:11
-
-
Save alkuzad/9724effaccf85ebb22405c6b3f56ac37 to your computer and use it in GitHub Desktop.
all ssm parameters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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