Skip to content

Instantly share code, notes, and snippets.

@coingraham
Last active December 8, 2021 12:07
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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
@Normal
Copy link

Normal commented Aug 10, 2020

what is yaml ?

@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