Skip to main content

Overview

Apache Iceberg provides first-class support for Amazon S3 through the iceberg-aws module. The S3FileIO implementation offers optimized performance, security features, and seamless integration with AWS services.

Enabling AWS Integration

The iceberg-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

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)

Each object is encrypted with a unique key using AES-256 encryption.

SSE-KMS (AWS KMS-Managed Keys)

Provides additional audit trails and key rotation.

DSSE-KMS (Dual-layer Encryption)

Applies two layers of encryption for compliance requirements.

SSE-C (Customer-Provided Keys)

You manage encryption keys; S3 manages encryption/decryption.

Object Store Location Provider

Traditional Hive-style layouts can cause S3 throttling due to all files being under the same prefix. The ObjectStoreLocationProvider distributes files across multiple prefixes.

Enable Object Storage Layout

How It Works

Files are written with a 20-bit hash distributed across directories:
This ensures even distribution across S3 bucket prefixes for optimal throughput.

Omit Partition Paths

Results in:

S3 Access Control

Access Control Lists (ACL)

Valid values: private, public-read, public-read-write, authenticated-read, bucket-owner-read, bucket-owner-full-control

S3 Tags

Write Tags

All objects will be tagged with team=analytics and env=production.

Delete Tags

Objects are tagged before deletion, enabling lifecycle policies to handle cleanup.

Auto-tag with Table/Namespace

Objects tagged with 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

Enables integrity checks for uploads (adds overhead).

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:
Requires S3 Access Grants Plugin in classpath.

Transfer Acceleration

Speed up transfers by 50-500% for long-distance, large object transfers.

Analytics Accelerator

Use the Analytics Accelerator Library for improved performance:

Key Configuration

Cross-Region Access

Allows access to buckets in different regions (adds latency to first request).

Dual-stack (IPv6) Endpoints

Resolves to IPv6 when available, falls back to IPv4.

AWS Client Customization

AssumeRole for Cross-Account Access

Custom Client Factory

Implement org.apache.iceberg.aws.AwsClientFactory:
Then configure:

Migration from S3A

S3FileIO is recommended over HadoopFileIO with S3A for better performance and AWS integration.
S3FileIO can read paths written by S3A (s3a:// and s3n:// schemes), making migration seamless. If you must use S3A:
  1. Set warehouse to s3a://my-bucket/warehouse
  2. Add hadoop-aws dependency
  3. Configure Hadoop properties:

Best Practices

Enable write.object-storage.enabled=true to avoid S3 throttling from hot prefixes.
Set s3.retry.num-retries=32 for workloads that may trigger S3 auto-scaling.
KMS provides audit trails and key rotation required by many compliance frameworks.
Use s3.delete.tags with lifecycle policies instead of hard deletes for cost optimization.
Use a common write.data.path to maximize prefix distribution benefits.

Troubleshooting

Throttling Errors

Solutions:
  • Enable object storage layout
  • Increase retry count
  • Reduce parallelism temporarily
  • Contact AWS to increase partition count

Access Denied

Check:
  • IAM permissions (GetObject, PutObject, DeleteObject, ListBucket)
  • Bucket policy
  • S3 Access Points configuration
  • Encryption key access (for SSE-KMS)

Connection Timeout

Solutions:
  • 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