S3 Transfer Acceleration & Multipart Upload
Key concepts
Transfer Acceleration uses CloudFront
Multipart upload for large files
Byte-range fetches
S3 Select for query optimization
Presigned URLs
Overview
Amazon S3 provides several features to optimize data transfer performance, particularly for large files and geographically distributed users. Understanding these features is essential for designing high-performing architectures that minimize latency and maximize throughput.
This topic covers five key performance optimization techniques: Transfer Acceleration for global uploads, Multipart Upload for large files, Byte-Range Fetches for parallel downloads, S3 Select for server-side filtering, and Presigned URLs for secure temporary access.
Key Principle
Combine Transfer Acceleration with Multipart Upload for maximum performance on large file uploads over long distances. Tests show up to 61% faster uploads when using both features together compared to standard single-part uploads.
Know when to use each feature: Transfer Acceleration for distant users, Multipart Upload for large files (>100 MB), Byte-Range Fetches for parallel downloads, S3 Select for filtering CSV/JSON/Parquet data, and Presigned URLs for temporary access without AWS credentials.
Architecture Diagram
The following diagram illustrates how S3 transfer optimization features work together:

Key Concepts
S3 Transfer Acceleration
S3 Transfer Acceleration
S3 Transfer Acceleration (S3TA) speeds up long-distance transfers by routing data through Amazon CloudFront's globally distributed edge locations.
How It Works:
- Client uploads data to the nearest CloudFront edge location
- Data travels over AWS's optimized backbone network to S3
- Reduces the impact of internet routing, congestion, and distance
Performance Benefits:
- 50-500% faster transfers over long distances
- Minimizes latency caused by geographic distance
- Fully utilizes available bandwidth
- Consistent performance regardless of client location
Pricing:
- US/Europe/Japan edge: $0.04/GB transferred
- Other edge locations: $0.08/GB transferred
- Only charged when acceleration actually improves performance
# Enable Transfer Acceleration on a bucket
aws s3api put-bucket-accelerate-configuration \
--bucket my-bucket \
--accelerate-configuration Status=Enabled
# Upload using accelerate endpoint
aws s3 cp large-file.zip s3://my-bucket/ \
--endpoint-url https://s3-accelerate.amazonaws.comWhen to Use Transfer Acceleration
| Scenario | Use Transfer Acceleration? | Why |
|---|---|---|
| Users uploading from same region as bucket | No | Minimal benefit, adds cost |
| Users uploading from different continent | Yes | Significant latency reduction |
| Small files (<1 MB) | No | Overhead outweighs benefit |
| Large files (>100 MB) over long distance | Yes | Maximum benefit |
| Consistent uploads from global locations | Yes | Predictable performance |
Multipart Upload
Multipart Upload
Multipart Upload allows you to upload large objects as a set of parts that are uploaded in parallel, then assembled by S3.
Key Limits: | Parameter | Value | |-----------|-------| | Minimum part size | 5 MB (except last part) | | Maximum part size | 5 GB | | Maximum parts | 10,000 | | Maximum object size | 5 TB | | Recommended threshold | 100 MB |
Benefits:
- Parallel uploads improve throughput (~40% faster)
- Resume interrupted uploads without starting over
- Quick recovery from network issues
- Begin upload before knowing final file size
# Configure AWS CLI for optimal multipart uploads
aws configure set default.s3.max_concurrent_requests 20
aws configure set default.s3.multipart_threshold 100MB
aws configure set default.s3.multipart_chunksize 16MB
# Upload automatically uses multipart for large files
aws s3 cp large-file.zip s3://my-bucket/
# Low-level multipart upload API
aws s3api create-multipart-upload --bucket my-bucket --key large-file.zip
aws s3api upload-part --bucket my-bucket --key large-file.zip \
--part-number 1 --upload-id <upload-id> --body part1.zip
aws s3api complete-multipart-upload --bucket my-bucket --key large-file.zip \
--upload-id <upload-id> --multipart-upload file://parts.jsonBest Practice: Abort Incomplete Uploads
Incomplete multipart uploads continue to incur storage charges. Always configure a lifecycle rule to automatically abort incomplete uploads after a specified number of days.
{
"Rules": [
{
"ID": "AbortIncompleteMultipartUploads",
"Status": "Enabled",
"Filter": {},
"AbortIncompleteMultipartUpload": {
"DaysAfterInitiation": 7
}
}
]
}Byte-Range Fetches
Byte-Range Fetches
Byte-Range Fetches allow you to download specific portions of an object using the HTTP Range header, enabling parallel downloads and partial file retrieval.
Use Cases:
- Parallel downloads: Fetch different ranges concurrently
- Resume interrupted downloads: Continue from where you left off
- Partial file access: Read only the data you need
- Video streaming: Seek to specific positions
How It Works:
GET /object HTTP/1.1
Range: bytes=0-999999
Performance Tip: When downloading objects uploaded via multipart, use the same part boundaries for byte-range fetches to optimize performance.
# Download first 50MB
curl -H "Range: bytes=0-52428799" \
https://my-bucket.s3.amazonaws.com/large-file.zip -o part1
# Download next 50MB (in parallel)
curl -H "Range: bytes=52428800-104857599" \
https://my-bucket.s3.amazonaws.com/large-file.zip -o part2
# Combine parts
cat part1 part2 > large-file.zipS3 Select
S3 Select
S3 Select allows you to retrieve a subset of data from an object using SQL expressions, filtering data server-side before transfer.
Supported Formats:
- CSV (with or without compression)
- JSON (with or without compression)
- Apache Parquet (columnar format)
Compression Support:
- GZIP and BZIP2 (CSV and JSON only)
- Server-side encrypted objects supported
Performance Benefits:
- Up to 400% performance improvement
- Reduced data transfer costs
- Lower latency by filtering at source
import boto3
s3 = boto3.client('s3')
response = s3.select_object_content(
Bucket='my-bucket',
Key='sales-data.csv',
ExpressionType='SQL',
Expression="SELECT * FROM s3object s WHERE s.region = 'us-east-1' AND s.amount > 1000",
InputSerialization={
'CSV': {
'FileHeaderInfo': 'USE',
'RecordDelimiter': '\n',
'FieldDelimiter': ','
}
},
OutputSerialization={
'CSV': {}
}
)
# Process results
for event in response['Payload']:
if 'Records' in event:
print(event['Records']['Payload'].decode('utf-8'))S3 Select vs Athena vs Client-Side Filtering
| Feature | S3 Select | Athena | Client-Side |
|---|---|---|---|
| Query scope | Single object | Multiple objects | Downloaded data |
| Infrastructure | None | Serverless | Client resources |
| SQL support | Subset | Full ANSI SQL | Application code |
| Output formats | CSV, JSON | Multiple | Any |
| Best for | Simple filters on single files | Complex analytics across files | Small files or full downloads |
Presigned URLs
Presigned URLs
Presigned URLs provide time-limited access to S3 objects without requiring AWS credentials or changing bucket policies.
Key Characteristics:
- Grant temporary upload or download access
- Expire after specified duration
- No AWS credentials needed by recipient
- Works with any HTTP client (browser, curl, etc.)
Expiration Limits: | Method | Maximum Expiration | |--------|-------------------| | Console | 12 hours | | CLI/SDK | 7 days | | IAM User credentials | 7 days | | IAM Role/STS | Token lifetime (up to 36 hours) |
import boto3
from datetime import datetime, timedelta
s3 = boto3.client('s3')
# Presigned URL for download (GET)
download_url = s3.generate_presigned_url(
'get_object',
Params={'Bucket': 'my-bucket', 'Key': 'report.pdf'},
ExpiresIn=3600 # 1 hour
)
# Presigned URL for upload (PUT)
upload_url = s3.generate_presigned_url(
'put_object',
Params={'Bucket': 'my-bucket', 'Key': 'uploads/user-file.zip'},
ExpiresIn=3600
)
# Presigned POST for browser uploads with conditions
presigned_post = s3.generate_presigned_post(
'my-bucket',
'uploads/${filename}',
Fields={'acl': 'private'},
Conditions=[
{'acl': 'private'},
['content-length-range', 1, 10485760] # 1 byte to 10 MB
],
ExpiresIn=3600
)How It Works
Combined Transfer Optimization Flow

Performance Comparison
Transfer Performance Test Results
| Method | Time | Improvement |
|---|---|---|
| Single upload (baseline) | 72 seconds | - |
| Transfer Acceleration only | 43 seconds | 40% faster |
| Multipart Upload only (5MB parts, 6 parallel) | 45 seconds | 38% faster |
| Multipart + Transfer Acceleration | 28 seconds | 61% faster |
Optimal Part Size Selection
Part Size Trade-offs
| Part Size | Pros | Cons | Best For |
|---|---|---|---|
| 5 MB (minimum) | Maximum parallelization, fine-grained retry | More API calls, higher overhead | Unreliable networks |
| 16-64 MB (recommended) | Balanced performance and overhead | Moderate parallelization | Most use cases |
| 100+ MB | Fewer API calls, less overhead | Less parallelization, larger retry units | Stable, high-bandwidth connections |
Use Cases
Use Case 1: Global Media Upload Platform
Scenario: Video streaming service where creators worldwide upload large video files (1-50 GB) to a centralized S3 bucket in us-east-1.
Solution:
- Enable Transfer Acceleration on the bucket
- Use Multipart Upload with 64 MB parts
- Configure 10 parallel upload threads
- Implement retry logic for failed parts
import boto3
from boto3.s3.transfer import TransferConfig
# Configure for large file uploads with acceleration
config = TransferConfig(
multipart_threshold=100 * 1024 * 1024, # 100 MB
max_concurrency=10,
multipart_chunksize=64 * 1024 * 1024, # 64 MB
use_threads=True
)
s3 = boto3.client('s3',
endpoint_url='https://s3-accelerate.amazonaws.com'
)
s3.upload_file(
'large-video.mp4',
'media-bucket',
'videos/large-video.mp4',
Config=config
)Use Case 2: Log Analysis with S3 Select
Scenario: Application logs stored as gzipped JSON files in S3. Need to find specific error messages without downloading entire files.
Solution:
- Use S3 Select to query compressed JSON logs
- Filter for specific error codes and time ranges
- Reduce data transfer by 95%+
Use Case 3: Secure File Sharing Portal
Scenario: Enterprise needs to share large reports with external partners who don't have AWS credentials.
Solution:
- Generate Presigned URLs for download
- Set appropriate expiration (e.g., 24 hours)
- Use Byte-Range Fetches for large files
- Enable resume capability for interrupted downloads
Best Practices
S3 Transfer Best Practices
- Use Transfer Acceleration for uploads from distant locations (>1000 km from bucket region)
- Enable Multipart Upload for all files > 100 MB
- Configure lifecycle rules to abort incomplete multipart uploads
- Use byte-range fetches for parallel downloads of large files
- Leverage S3 Select to filter data server-side when querying CSV/JSON/Parquet
- Use Presigned URLs instead of making buckets public for temporary access
- Test with Speed Comparison Tool before enabling Transfer Acceleration
- Match part boundaries when using byte-range fetches on multipart-uploaded objects
Common Exam Scenarios
Exam Scenarios and Solutions
| Scenario | Solution | Why |
|---|---|---|
| Mobile app users worldwide upload photos to S3 | Enable Transfer Acceleration | Reduces latency for globally distributed uploads |
| Upload 10 GB database backup files | Use Multipart Upload with 100 MB parts | Enables parallel uploads, resume on failure |
| Share private S3 objects with external users temporarily | Generate Presigned URLs | Time-limited access without changing bucket policy |
| Query specific columns from large Parquet files | Use S3 Select | Server-side filtering reduces data transfer |
| Download large file with unstable connection | Use Byte-Range Fetches | Resume interrupted downloads from last position |
| Maximize upload speed for large files from Australia to us-east-1 | Transfer Acceleration + Multipart Upload | Combined approach provides best performance |
Common Pitfalls
Pitfall 1: Not Aborting Incomplete Multipart Uploads
Mistake: Starting multipart uploads without cleanup mechanisms.
Why it's costly:
- Incomplete parts continue to incur storage charges
- Parts are not visible in normal S3 listings
- Can accumulate significant hidden costs
Correct Approach:
- Configure lifecycle rule to abort incomplete uploads after 7 days
- Implement application-level cleanup for failed uploads
- Monitor with S3 Storage Lens for incomplete multipart uploads
Pitfall 2: Using Transfer Acceleration for Same-Region Transfers
Mistake: Enabling Transfer Acceleration for clients in the same region as the bucket.
Why it's wasteful:
- Adds latency instead of reducing it
- Incurs additional transfer costs
- No performance benefit for local transfers
Correct Approach:
- Use the AWS Speed Comparison Tool to test
- Only enable for geographically distant clients
- Consider using S3 endpoints for same-region transfers
Pitfall 3: Presigned URL Security Issues
Mistake: Creating presigned URLs with very long expiration times or not validating upload content.
Why it's risky:
- URLs can be shared or leaked
- No control once URL is generated
- Potential for unauthorized access or malicious uploads
Correct Approach:
- Use shortest practical expiration time
- Add conditions to presigned POSTs (content-length, content-type)
- Log and monitor presigned URL usage
- Use separate bucket/prefix for untrusted uploads
Test Your Knowledge
A company needs to upload 5 GB video files from users in Asia to an S3 bucket in us-west-2. What combination provides the BEST upload performance?
What is the MINIMUM part size for S3 Multipart Upload?
A data analyst needs to find specific records from a 10 GB CSV file stored in S3 without downloading the entire file. Which feature should they use?
What is the maximum expiration time for a presigned URL generated using the AWS CLI?
Related Services
AWS DataSync
Automated data transfer service for moving large amounts of data to/from S3
Quick Reference
Transfer Acceleration Endpoint Format
# Standard endpoint
https://bucket-name.s3.region.amazonaws.com
# Accelerate endpoint
https://bucket-name.s3-accelerate.amazonaws.com
# Dual-stack accelerate endpoint (IPv4 + IPv6)
https://bucket-name.s3-accelerate.dualstack.amazonaws.comMultipart Upload Limits
Multipart Upload Quick Reference
| Parameter | Value |
|---|---|
| Minimum part size | 5 MB |
| Maximum part size | 5 GB |
| Maximum number of parts | 10,000 |
| Maximum object size | 5 TB |
| Recommended upload threshold | 100 MB |
| Recommended part size | 16-64 MB |
S3 Select SQL Support
S3 Select SQL Operations
| Supported | Not Supported |
|---|---|
| SELECT, FROM, WHERE | JOIN, UNION, subqueries |
| AND, OR, NOT | GROUP BY, HAVING |
| LIKE, BETWEEN, IN | ORDER BY (Parquet only) |
| Aggregate functions (SUM, AVG, COUNT) | Window functions |
| CAST, COALESCE, NULLIF | User-defined functions |