python/example_code/s3/file_transfer/README.md
Shows how to use the AWS SDK for Python (Boto3) transfer manager to manage multipart uploads to and downloads from an Amazon Simple Storage Service (Amazon S3) bucket.
When the file to transfer is larger than the specified threshold, the transfer manager automatically uses multipart uploads or downloads. This example shows how to use several of the available transfer manager settings, and reports thread usage and time to transfer.
Amazon S3 is storage for the internet. You can use Amazon S3 to store and retrieve any amount of data at any time, from anywhere on the web.
Interactively demonstrates the code in file_transfer.py by running the following in a command window in the file_transfer folder.
python -m demo_file_transfer
The demonstration script asks questions, takes actions to upload and download files with various configurations, and manages artifact creation and cleanup.
Amazon S3 objects and downloaded files created during the demonstration are cleaned up at the end.
The unit tests in this module use the botocore Stubber. This captures requests before they are sent to AWS, and returns a mocked response. To run all of the tests, run the following in your [GitHub root]/python/example_code/s3/file_transfer folder.
python -m pytest
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0