April 2018
Intermediate to advanced
280 pages
8h 37m
English
The following code shows how we can download a file from the specified S3 bucket. Here, packt-pub is the bucket name and test.txt is the file that we intend to download. The downloaded file is saved as /tmp/hello.txt:
import boto3s3 = boto3.resource('s3')s3.Bucket('packt-pub').download_file('test.txt', '/tmp/hello.txt')