MultiCloud Classroom notes 07/Apr/2026

AWS S3 Table Buckets

Introduction

S3 Table Buckets are a new feature in Amazon S3 that allow you to store structured data as tables directly inside S3.

  • Combines object storage + table format
  • Uses Apache Iceberg under the hood
  • Enables SQL-based querying

Key Concepts

Term Description
Table Bucket Special S3 bucket for storing tables
Namespace Logical grouping of tables
Table Structured dataset (rows & columns)

Architecture

S3 Table Bucket
└── Namespace
    ├── Table1
    └── Table2

Prerequisites

  • AWS CLI installed and configured
  • Proper IAM permissions
  • Region supported for S3 Tables

Step 0: Create a Regular S3 Bucket

aws s3api create-bucket \
  --bucket demo-aws-s3-qt-123 \
  --region us-east-1

Step 1: Create a Table Bucket

aws s3tables create-table-bucket \
  --name qt-demo-s3-table \
  --region us-east-1

Step 2: Create Namespace and Table

List existing table buckets

aws s3tables list-table-buckets

Create a namespace

aws s3tables create-namespace \
  --table-bucket-arn arn:aws:s3tables:us-east-1:795731011370:bucket/qt-demo-s3-table \
  --namespace demo

Create a table

aws s3tables create-table \
  --table-bucket-arn arn:aws:s3tables:us-east-1:795731011370:bucket/qt-demo-s3-table \
  --namespace demo \
  --name users \
  --format ICEBERG

Step 3: Insert Data

Data can be inserted using:

  • Apache Spark
  • AWS Glue
  • Data pipelines

Sample Data (JSON)

[
  { "id": 1, "name": "Alice", "age": 25 },
  { "id": 2, "name": "Bob",   "age": 30 }
]

Example: Insert Data Using PySpark

Install PySpark

pip install pyspark

PySpark Script

from pyspark.sql import SparkSession

spark = SparkSession.builder \
    .appName("S3TablesInsert") \
    .getOrCreate()

data = [
    (1, "Alice", 25),
    (2, "Bob",   30),
]

columns = ["id", "name", "age"]

df = spark.createDataFrame(data, columns)

# Write to S3 Table (Iceberg format)
df.writeTo("demo.users").append()

spark.stop()

Step 4: Query Data with Athena

SELECT * FROM users;

Features

  • Built-in optimization (compaction, cleanup)
  • Highly scalable storage
  • Open table format (Apache Iceberg)
  • Integration with:
    • Amazon Athena
    • Amazon Redshift
    • Apache Spark

Use Cases

  • Data lakes
  • Analytics pipelines
  • Log processing
  • Large-scale reporting

Comparison: S3 Table Buckets vs Regular S3

Feature Regular S3 S3 Table Buckets
Storage Files Tables
Query Limited SQL supported
Format Any Apache Iceberg

Comparison: S3 Table Buckets vs DynamoDB

Feature S3 Tables DynamoDB
Type Analytics Application DB
Query SQL API
Scale Very large datasets Low-latency apps

Summary

  • S3 Table Buckets bring table support to S3
  • Ideal for analytics workloads
  • Not a replacement for transactional databases like DynamoDB
  • Best used with Athena or Spark

Useful CLI Commands

List namespaces

aws s3tables list-namespaces \
  --table-bucket-arn arn:aws:s3tables:us-east-1:795731011370:bucket/qt-demo-2205

List tables in a namespace

aws s3tables list-tables \
  --table-bucket-arn arn:aws:s3tables:us-east-1:795731011370:bucket/qt-demo-2205 \
  --namespace demo2

Delete a table

aws s3tables delete-table \
  --table-bucket-arn arn:aws:s3tables:us-east-1:795731011370:bucket/qt-demo-2205 \
  --namespace demo2 \
  --name daily_sales

Delete a namespace

aws s3tables delete-namespace \
  --table-bucket-arn arn:aws:s3tables:us-east-1:795731011370:bucket/qt-demo-2205 \
  --namespace demo2

Delete a table bucket

aws s3tables delete-table-bucket \
  --table-bucket-arn arn:aws:s3tables:us-east-1:795731011370:bucket/qt-demo-2205

Upload file to S3

aws s3 cp 02-04-2026.md s3://demo-aws-s3-qt-123/2-apr-2026.md

Put object (generic)

aws s3api put-object \
  --bucket demo-aws-s3-qt-123 \
  --key <your-key> \
  --body <your-file>

Leave a comment

Turn on JavaScript to leave a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Plugin for Social Media by Acurax Wordpress Design Studio
Exit mobile version
%%footer%%