Generation

generate functionSun, 13 Nov 2022

get my AWS secret

def get_secret(secret_name, region_name): session = boto3.session.Session() client = session.client( service_name='secretsmanager', region_name=region_name ) get_secret_value_response = client.get_secret_value( SecretId=secret_name ) return get_secret_value_response['SecretString']

Questions about programming?Chat with your personal AI assistant