Created
November 20, 2018 14:17
-
-
Save alastairhm/97c841d95c631102bb36e9817ab89516 to your computer and use it in GitHub Desktop.
Get SSM parameter with boto3
This file contains hidden or 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
import os | |
import sys | |
import json | |
import boto3 | |
import logging | |
from botocore.vendored import requests | |
from botocore.exceptions import ClientError | |
ssm = boto3.client('ssm') | |
parameter = ssm.get_parameter(Name='/jenkins/jenkins_api_user', WithDecryption=True) | |
print(parameter['Parameter']['Value']) | |
parameter = ssm.get_parameter(Name='/jenkins/jenkins_api_token', WithDecryption=True) | |
print(parameter['Parameter']['Value']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment