Skip to content

Instantly share code, notes, and snippets.

@coingraham
Last active December 8, 2021 12:07
Show Gist options
  • Save coingraham/c6153809e4d179396421 to your computer and use it in GitHub Desktop.
Save coingraham/c6153809e4d179396421 to your computer and use it in GitHub Desktop.
Python - read yaml from S3
import boto3
bucket = "bucket"
s3_client = boto3.client('s3')
response = s3_client.get_object(Bucket=bucket, Key="filename.yaml")
try:
configfile = yaml.safe_load(response["Body"])
except yaml.YAMLError as exc:
return exc
@Vladimir-Filimonov
Copy link

@cn-manjunath
Copy link

Thanks a lot buddy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment