Overview
Apache Iceberg provides first-class support for Amazon S3 through theiceberg-aws module. The S3FileIO implementation offers optimized performance, security features, and seamless integration with AWS services.
Enabling AWS Integration
Theiceberg-aws module is bundled with Spark and Flink runtimes from version 0.11.0+. You’ll need to provide AWS SDK v2 dependencies separately.
Spark Example
Flink Example
S3FileIO Features
Progressive Multipart Upload
S3FileIO uses an optimized multipart upload algorithm that:
- Uploads parts in parallel as soon as they’re ready
- Deletes local parts immediately after upload
- Maximizes upload speed and minimizes disk usage
Configuration
Server-Side Encryption
SSE-S3 (Amazon S3-Managed Keys)
SSE-KMS (AWS KMS-Managed Keys)
DSSE-KMS (Dual-layer Encryption)
SSE-C (Customer-Provided Keys)
Object Store Location Provider
Traditional Hive-style layouts can cause S3 throttling due to all files being under the same prefix. TheObjectStoreLocationProvider distributes files across multiple prefixes.
Enable Object Storage Layout
How It Works
Files are written with a 20-bit hash distributed across directories:Omit Partition Paths
S3 Access Control
Access Control Lists (ACL)
private, public-read, public-read-write, authenticated-read, bucket-owner-read, bucket-owner-full-control
S3 Tags
Write Tags
team=analytics and env=production.
Delete Tags
Auto-tag with Table/Namespace
iceberg.table=<table-name> and iceberg.namespace=<namespace>.
Performance Optimization
S3 Retries
For high-throughput workloads encountering throttling:Setting retries to 32 allows time for S3 to auto-scale capacity.
Write Checksum Verification
Advanced Features
S3 Access Points
Use access points for multi-region or cross-region access:S3 Access Grants
Use IAM principals for fine-grained access:Transfer Acceleration
Analytics Accelerator
Use the Analytics Accelerator Library for improved performance:Key Configuration
Cross-Region Access
Dual-stack (IPv6) Endpoints
AWS Client Customization
AssumeRole for Cross-Account Access
Custom Client Factory
Implementorg.apache.iceberg.aws.AwsClientFactory:
Migration from S3A
S3FileIO can read paths written by S3A (s3a:// and s3n:// schemes), making migration seamless.
If you must use S3A:
- Set warehouse to
s3a://my-bucket/warehouse - Add
hadoop-awsdependency - Configure Hadoop properties:
Best Practices
Use Object Storage Layout
Use Object Storage Layout
Enable
write.object-storage.enabled=true to avoid S3 throttling from hot prefixes.Enable Retry for High Throughput
Enable Retry for High Throughput
Set
s3.retry.num-retries=32 for workloads that may trigger S3 auto-scaling.Use SSE-KMS for Compliance
Use SSE-KMS for Compliance
KMS provides audit trails and key rotation required by many compliance frameworks.
Tag Objects for Lifecycle
Tag Objects for Lifecycle
Use
s3.delete.tags with lifecycle policies instead of hard deletes for cost optimization.Troubleshooting
Throttling Errors
- Enable object storage layout
- Increase retry count
- Reduce parallelism temporarily
- Contact AWS to increase partition count
Access Denied
- IAM permissions (GetObject, PutObject, DeleteObject, ListBucket)
- Bucket policy
- S3 Access Points configuration
- Encryption key access (for SSE-KMS)
Connection Timeout
- Check network connectivity
- Verify VPC endpoints (if using)
- Increase timeout:
Next Steps
Glue Catalog
Configure AWS Glue catalog for metadata
Dell ECS Storage
Use Dell Enterprise Cloud Storage
Custom FileIO
Implement custom storage backends