Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
NamedTemporaryFile example
import boto3
import tempfile
s3_bucket = "..."
s3_path = "..."
s3 = boto3.resource('s3', region_name='eu-west-1')
with tempfile.NamedTemporaryFile() as downloaded_file:
s3.Object(s3_bucket, s3_path).download_file(downloaded_file.name)
# continue processing downloaded_file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.