diff --git a/README.md b/README.md
index 78a2f3b7f7..b3579ab3eb 100644
--- a/README.md
+++ b/README.md
@@ -223,7 +223,7 @@ Floci supports local emulation for application services, data services, eventing
| Events and workflows | EventBridge, EventBridge Pipes, EventBridge Scheduler, Step Functions, SWF, CloudWatch Logs, CloudWatch Metrics |
| API and identity | API Gateway REST, API Gateway v2, AppSync, Cognito, ACM, Route53, Cloud Map |
| Containers and compute | ECS, EC2, Lightsail, EKS, MWAA, ECR, CodeBuild, CodeDeploy, CodePipeline, AWS Batch, Auto Scaling, Application Auto Scaling, Elastic Beanstalk, ELB v2 |
-| Data, analytics, and AI | Athena, Glue, EMR, Firehose, Managed Service for Apache Flink, OpenSearch, S3 Vectors, Textract, Transcribe, Bedrock Runtime |
+| Data, analytics, and AI | Athena, Glue, EMR, Firehose, Managed Service for Apache Flink, OpenSearch, S3 Tables, S3 Vectors, Textract, Transcribe, Bedrock Runtime |
| Databases and caching | RDS, RDS Data API, Neptune, DocumentDB, MemoryDB, ElastiCache |
| Messaging and transfer | SES, Kinesis, MSK, Amazon MQ, Transfer Family, IoT Core |
| Security and governance | WAF v2, CloudTrail, CloudFront, Resource Groups Tagging API |
diff --git a/compatibility-tests/sdk-test-java/pom.xml b/compatibility-tests/sdk-test-java/pom.xml
index 82772be5f7..328b515ab0 100644
--- a/compatibility-tests/sdk-test-java/pom.xml
+++ b/compatibility-tests/sdk-test-java/pom.xml
@@ -369,6 +369,11 @@
software.amazon.awssdk
s3vectors
+
+
+ software.amazon.awssdk
+ s3tables
+
software.amazon.awssdk
diff --git a/compatibility-tests/sdk-test-java/src/main/java/com/floci/test/TestFixtures.java b/compatibility-tests/sdk-test-java/src/main/java/com/floci/test/TestFixtures.java
index 81c816eb1b..1c984ffe80 100644
--- a/compatibility-tests/sdk-test-java/src/main/java/com/floci/test/TestFixtures.java
+++ b/compatibility-tests/sdk-test-java/src/main/java/com/floci/test/TestFixtures.java
@@ -84,6 +84,7 @@ import software.amazon.awssdk.services.route53.model.RRType;
import software.amazon.awssdk.services.route53.model.ResourceRecord;
import software.amazon.awssdk.services.route53.model.ResourceRecordSet;
import software.amazon.awssdk.services.s3vectors.S3VectorsClient;
+import software.amazon.awssdk.services.s3tables.S3TablesClient;
import software.amazon.awssdk.core.SdkBytes;
import software.amazon.awssdk.services.lambda.model.CreateFunctionRequest;
@@ -922,4 +923,12 @@ public final class TestFixtures {
.credentialsProvider(CREDENTIALS)
.build();
}
+
+ public static S3TablesClient s3tablesClient() {
+ return S3TablesClient.builder()
+ .endpointOverride(ENDPOINT)
+ .region(REGION)
+ .credentialsProvider(CREDENTIALS)
+ .build();
+ }
}
diff --git a/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/S3TablesTest.java b/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/S3TablesTest.java
new file mode 100644
index 0000000000..1bc2814d27
--- /dev/null
+++ b/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/S3TablesTest.java
@@ -0,0 +1,233 @@
+package com.floci.test;
+
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.MethodOrderer;
+import org.junit.jupiter.api.Order;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestMethodOrder;
+import software.amazon.awssdk.services.s3tables.S3TablesClient;
+import software.amazon.awssdk.services.s3tables.model.*;
+
+import java.util.Map;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+
+@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
+class S3TablesTest {
+ private static S3TablesClient client;
+ private static String bucketName;
+ private static String bucketArn;
+ private static String tableName;
+ private static String versionToken;
+ private static final String NAMESPACE = "analytics";
+
+ @BeforeAll
+ static void setup() {
+ client = TestFixtures.s3tablesClient();
+ bucketName = TestFixtures.uniqueName("table-bucket");
+ tableName = TestFixtures.uniqueName("events");
+ }
+
+ @AfterAll
+ static void cleanup() {
+ if (client == null) {
+ return;
+ }
+ if (bucketArn != null) {
+ cleanup("table " + tableName, () -> client.deleteTable(DeleteTableRequest.builder()
+ .tableBucketARN(bucketArn).namespace(NAMESPACE).name(tableName).build()));
+ cleanup("namespace " + NAMESPACE, () -> client.deleteNamespace(DeleteNamespaceRequest.builder()
+ .tableBucketARN(bucketArn).namespace(NAMESPACE).build()));
+ cleanup("table bucket " + bucketArn, () -> client.deleteTableBucket(DeleteTableBucketRequest.builder()
+ .tableBucketARN(bucketArn).build()));
+ }
+ client.close();
+ }
+
+ private static void cleanup(String resource, Runnable deletion) {
+ try {
+ deletion.run();
+ } catch (Exception exception) {
+ System.err.printf("S3 Tables SDK test cleanup failed for %s: %s%n", resource, exception.getMessage());
+ }
+ }
+
+ @Test
+ @Order(1)
+ void createsAndGetsTableBucket() {
+ CreateTableBucketResponse created = client.createTableBucket(
+ CreateTableBucketRequest.builder()
+ .name(bucketName)
+ .tags(Map.of("suite", "sdk-java"))
+ .encryptionConfiguration(EncryptionConfiguration.builder().sseAlgorithm(SSEAlgorithm.AES256).build())
+ .storageClassConfiguration(StorageClassConfiguration.builder().storageClass(StorageClass.STANDARD).build())
+ .build());
+ bucketArn = created.arn();
+ assertThat(bucketArn).contains("arn:aws:s3tables:").endsWith("bucket/" + bucketName);
+
+ GetTableBucketResponse fetched = client.getTableBucket(
+ GetTableBucketRequest.builder().tableBucketARN(bucketArn).build());
+ assertThat(fetched.name()).isEqualTo(bucketName);
+ assertThat(fetched.arn()).isEqualTo(bucketArn);
+ }
+
+ @Test
+ @Order(2)
+ void createsNamespaceAndTable() {
+ CreateNamespaceResponse namespace = client.createNamespace(
+ CreateNamespaceRequest.builder().tableBucketARN(bucketArn).namespace(NAMESPACE).build());
+ assertThat(namespace.namespace()).containsExactly(NAMESPACE);
+
+ CreateTableResponse table = client.createTable(CreateTableRequest.builder()
+ .tableBucketARN(bucketArn)
+ .namespace(NAMESPACE)
+ .name(tableName)
+ .format(OpenTableFormat.ICEBERG)
+ .metadata(TableMetadata.builder().iceberg(IcebergMetadata.builder()
+ .properties(Map.of("format-version", "2")).build()).build())
+ .encryptionConfiguration(EncryptionConfiguration.builder().sseAlgorithm(SSEAlgorithm.AES256).build())
+ .storageClassConfiguration(StorageClassConfiguration.builder().storageClass(StorageClass.STANDARD).build())
+ .tags(Map.of("suite", "sdk-java"))
+ .build());
+ versionToken = table.versionToken();
+ assertThat(table.tableARN()).isEqualTo(bucketArn + "/table/" + tableName);
+ assertThat(versionToken).isNotBlank();
+
+ GetTableResponse fetched = client.getTable(GetTableRequest.builder()
+ .tableBucketARN(bucketArn).namespace(NAMESPACE).name(tableName).build());
+ assertThat(fetched.tableARN()).isEqualTo(table.tableARN());
+ assertThat(fetched.namespace()).containsExactly(NAMESPACE);
+ assertThat(fetched.format()).isEqualTo(OpenTableFormat.ICEBERG);
+ }
+
+ @Test
+ @Order(3)
+ void getsAndListsResourcesWithPrefixes() {
+ assertThat(client.listTableBuckets(ListTableBucketsRequest.builder().prefix("table-bucket").build()).tableBuckets())
+ .anyMatch(bucket -> bucketName.equals(bucket.name()));
+ assertThat(client.getNamespace(GetNamespaceRequest.builder().tableBucketARN(bucketArn).namespace(NAMESPACE).build())
+ .namespace()).containsExactly(NAMESPACE);
+ assertThat(client.listNamespaces(ListNamespacesRequest.builder().tableBucketARN(bucketArn).prefix("anal").build())
+ .namespaces()).anyMatch(namespace -> namespace.namespace().contains(NAMESPACE));
+ assertThat(client.listTables(ListTablesRequest.builder().tableBucketARN(bucketArn).namespace(NAMESPACE)
+ .prefix("events").build()).tables())
+ .anyMatch(table -> tableName.equals(table.name()));
+ }
+
+ @Test
+ @Order(4)
+ void updatesAndGetsMetadataLocationAndRejectsStaleVersionToken() {
+ UpdateTableMetadataLocationResponse updated = client.updateTableMetadataLocation(
+ UpdateTableMetadataLocationRequest.builder()
+ .tableBucketARN(bucketArn)
+ .namespace(NAMESPACE)
+ .name(tableName)
+ .metadataLocation("s3://warehouse/" + tableName + "/v2.metadata.json")
+ .versionToken(versionToken)
+ .build());
+ assertThat(updated.metadataLocation()).endsWith("v2.metadata.json");
+ assertThat(updated.versionToken()).isNotEqualTo(versionToken);
+ assertThat(client.getTableMetadataLocation(GetTableMetadataLocationRequest.builder()
+ .tableBucketARN(bucketArn).namespace(NAMESPACE).name(tableName).build())
+ .metadataLocation()).isEqualTo(updated.metadataLocation());
+
+ assertThatThrownBy(() -> client.updateTableMetadataLocation(
+ UpdateTableMetadataLocationRequest.builder()
+ .tableBucketARN(bucketArn).namespace(NAMESPACE).name(tableName)
+ .metadataLocation("s3://warehouse/stale.metadata.json")
+ .versionToken(versionToken).build()))
+ .isInstanceOf(ConflictException.class);
+ versionToken = updated.versionToken();
+ }
+
+ @Test
+ @Order(5)
+ void roundTripsAndDeletesBucketAndTablePolicies() {
+ String policy = "{\"Version\":\"2012-10-17\",\"Statement\":[]}";
+ client.putTableBucketPolicy(PutTableBucketPolicyRequest.builder()
+ .tableBucketARN(bucketArn).resourcePolicy(policy).build());
+ assertThat(client.getTableBucketPolicy(GetTableBucketPolicyRequest.builder().tableBucketARN(bucketArn).build())
+ .resourcePolicy()).isEqualTo(policy);
+
+ client.putTablePolicy(PutTablePolicyRequest.builder()
+ .tableBucketARN(bucketArn).namespace(NAMESPACE).name(tableName).resourcePolicy(policy).build());
+ assertThat(client.getTablePolicy(GetTablePolicyRequest.builder()
+ .tableBucketARN(bucketArn).namespace(NAMESPACE).name(tableName).build()).resourcePolicy()).isEqualTo(policy);
+ }
+
+ @Test
+ @Order(6)
+ void roundTripsTypedMaintenanceConfigurations() {
+ TableBucketMaintenanceConfigurationValue bucketValue = TableBucketMaintenanceConfigurationValue.builder()
+ .status(MaintenanceStatus.ENABLED).build();
+ client.putTableBucketMaintenanceConfiguration(PutTableBucketMaintenanceConfigurationRequest.builder()
+ .tableBucketARN(bucketArn)
+ .type(TableBucketMaintenanceType.ICEBERG_UNREFERENCED_FILE_REMOVAL)
+ .value(bucketValue)
+ .build());
+ assertThat(client.getTableBucketMaintenanceConfiguration(GetTableBucketMaintenanceConfigurationRequest.builder()
+ .tableBucketARN(bucketArn).build())
+ .configuration().get(TableBucketMaintenanceType.ICEBERG_UNREFERENCED_FILE_REMOVAL).status())
+ .isEqualTo(MaintenanceStatus.ENABLED);
+
+ TableMaintenanceConfigurationValue tableValue = TableMaintenanceConfigurationValue.builder()
+ .status(MaintenanceStatus.ENABLED).build();
+ client.putTableMaintenanceConfiguration(PutTableMaintenanceConfigurationRequest.builder()
+ .tableBucketARN(bucketArn).namespace(NAMESPACE).name(tableName)
+ .type(TableMaintenanceType.ICEBERG_COMPACTION)
+ .value(tableValue)
+ .build());
+ assertThat(client.getTableMaintenanceConfiguration(GetTableMaintenanceConfigurationRequest.builder()
+ .tableBucketARN(bucketArn).namespace(NAMESPACE).name(tableName).build())
+ .configuration().get(TableMaintenanceType.ICEBERG_COMPACTION).status())
+ .isEqualTo(MaintenanceStatus.ENABLED);
+ }
+
+ @Test
+ @Order(7)
+ void renamesTableAndRotatesItsVersionToken() {
+ String originalToken = versionToken;
+ String renamedTableName = tableName + "-renamed";
+ client.renameTable(RenameTableRequest.builder()
+ .tableBucketARN(bucketArn).namespace(NAMESPACE).name(tableName)
+ .newName(renamedTableName).versionToken(originalToken).build());
+
+ GetTableResponse renamed = client.getTable(GetTableRequest.builder()
+ .tableBucketARN(bucketArn).namespace(NAMESPACE).name(renamedTableName).build());
+ assertThat(renamed.name()).isEqualTo(renamedTableName);
+ assertThat(renamed.versionToken()).isNotEqualTo(originalToken);
+ assertThatThrownBy(() -> client.getTable(GetTableRequest.builder()
+ .tableBucketARN(bucketArn).namespace(NAMESPACE).name(tableName).build()))
+ .isInstanceOf(NotFoundException.class);
+ tableName = renamedTableName;
+ versionToken = renamed.versionToken();
+ }
+
+ @Test
+ @Order(8)
+ void deletesPoliciesAndResourceHierarchy() {
+ client.deleteTablePolicy(DeleteTablePolicyRequest.builder()
+ .tableBucketARN(bucketArn).namespace(NAMESPACE).name(tableName).build());
+ assertThatThrownBy(() -> client.getTablePolicy(GetTablePolicyRequest.builder()
+ .tableBucketARN(bucketArn).namespace(NAMESPACE).name(tableName).build()))
+ .isInstanceOf(NotFoundException.class);
+
+ client.deleteTableBucketPolicy(DeleteTableBucketPolicyRequest.builder().tableBucketARN(bucketArn).build());
+ assertThatThrownBy(() -> client.getTableBucketPolicy(GetTableBucketPolicyRequest.builder().tableBucketARN(bucketArn).build()))
+ .isInstanceOf(NotFoundException.class);
+
+ client.deleteTable(DeleteTableRequest.builder().tableBucketARN(bucketArn).namespace(NAMESPACE).name(tableName).build());
+ assertThatThrownBy(() -> client.getTable(GetTableRequest.builder()
+ .tableBucketARN(bucketArn).namespace(NAMESPACE).name(tableName).build()))
+ .isInstanceOf(NotFoundException.class);
+ client.deleteNamespace(DeleteNamespaceRequest.builder().tableBucketARN(bucketArn).namespace(NAMESPACE).build());
+ assertThatThrownBy(() -> client.getNamespace(GetNamespaceRequest.builder()
+ .tableBucketARN(bucketArn).namespace(NAMESPACE).build()))
+ .isInstanceOf(NotFoundException.class);
+ client.deleteTableBucket(DeleteTableBucketRequest.builder().tableBucketARN(bucketArn).build());
+ assertThatThrownBy(() -> client.getTableBucket(GetTableBucketRequest.builder().tableBucketARN(bucketArn).build()))
+ .isInstanceOf(NotFoundException.class);
+ }
+}
diff --git a/compatibility-tests/sdk-test-node/package.json b/compatibility-tests/sdk-test-node/package.json
index fd9bb1faf5..a463e820f5 100644
--- a/compatibility-tests/sdk-test-node/package.json
+++ b/compatibility-tests/sdk-test-node/package.json
@@ -21,13 +21,14 @@
"@aws-sdk/client-kinesis": "^3.500.0",
"@aws-sdk/client-kms": "^3.500.0",
"@aws-sdk/client-lambda": "^3.500.0",
+ "@aws-sdk/client-neptune": "^3.500.0",
"@aws-sdk/client-pipes": "^3.500.0",
"@aws-sdk/client-s3": "^3.500.0",
+ "@aws-sdk/client-s3tables": "3.1111.0",
"@aws-sdk/client-secrets-manager": "^3.500.0",
"@aws-sdk/client-sns": "^3.500.0",
"@aws-sdk/client-sqs": "^3.500.0",
"@aws-sdk/client-ssm": "^3.500.0",
- "@aws-sdk/client-neptune": "^3.500.0",
"@aws-sdk/client-sts": "^3.500.0",
"selfsigned": "^5.5.0",
"ws": "^8.0.0"
diff --git a/compatibility-tests/sdk-test-node/tests/s3tables.test.ts b/compatibility-tests/sdk-test-node/tests/s3tables.test.ts
new file mode 100644
index 0000000000..beebd4ce7a
--- /dev/null
+++ b/compatibility-tests/sdk-test-node/tests/s3tables.test.ts
@@ -0,0 +1,198 @@
+import { afterAll, beforeAll, describe, expect, it } from 'vitest';
+import {
+ ConflictException,
+ CreateNamespaceCommand,
+ CreateTableBucketCommand,
+ CreateTableCommand,
+ DeleteNamespaceCommand,
+ DeleteTableBucketCommand,
+ DeleteTableBucketPolicyCommand,
+ DeleteTableCommand,
+ DeleteTablePolicyCommand,
+ GetNamespaceCommand,
+ GetTableBucketCommand,
+ GetTableBucketMaintenanceConfigurationCommand,
+ GetTableBucketPolicyCommand,
+ GetTableCommand,
+ GetTableMaintenanceConfigurationCommand,
+ GetTableMetadataLocationCommand,
+ GetTablePolicyCommand,
+ ListNamespacesCommand,
+ ListTableBucketsCommand,
+ ListTablesCommand,
+ NotFoundException,
+ PutTableBucketMaintenanceConfigurationCommand,
+ PutTableBucketPolicyCommand,
+ PutTableMaintenanceConfigurationCommand,
+ PutTablePolicyCommand,
+ RenameTableCommand,
+ S3TablesClient,
+ UpdateTableMetadataLocationCommand,
+} from '@aws-sdk/client-s3tables';
+import { makeClient, uniqueName } from './setup';
+
+describe('S3 Tables lifecycle', () => {
+ let client: S3TablesClient;
+ let bucketArn: string;
+ const bucketName = uniqueName('table-bucket');
+ const namespace = 'analytics';
+ let tableName = uniqueName('events');
+ let versionToken: string;
+
+ beforeAll(() => {
+ client = makeClient(S3TablesClient);
+ });
+
+ afterAll(async () => {
+ if (!bucketArn) return;
+ await client.send(new DeleteTableCommand({ tableBucketARN: bucketArn, namespace, name: tableName })).catch(() => undefined);
+ await client.send(new DeleteNamespaceCommand({ tableBucketARN: bucketArn, namespace })).catch(() => undefined);
+ await client.send(new DeleteTableBucketCommand({ tableBucketARN: bucketArn })).catch(() => undefined);
+ });
+
+ it('creates a table bucket, namespace, and Iceberg table', async () => {
+ const bucket = await client.send(new CreateTableBucketCommand({
+ name: bucketName,
+ tags: { suite: 'sdk-node' },
+ encryptionConfiguration: { sseAlgorithm: 'AES256' },
+ storageClassConfiguration: { storageClass: 'STANDARD' },
+ }));
+ bucketArn = bucket.arn!;
+ expect(bucketArn).toContain(`bucket/${bucketName}`);
+
+ const createdNamespace = await client.send(new CreateNamespaceCommand({
+ tableBucketARN: bucketArn,
+ namespace: [namespace],
+ }));
+ expect(createdNamespace.namespace).toEqual([namespace]);
+
+ const table = await client.send(new CreateTableCommand({
+ tableBucketARN: bucketArn,
+ namespace,
+ name: tableName,
+ format: 'ICEBERG',
+ metadata: { iceberg: { properties: { 'format-version': '2' } } },
+ encryptionConfiguration: { sseAlgorithm: 'AES256' },
+ storageClassConfiguration: { storageClass: 'STANDARD' },
+ tags: { suite: 'sdk-node' },
+ }));
+ versionToken = table.versionToken!;
+ expect(table.tableARN).toBe(`${bucketArn}/table/${tableName}`);
+ });
+
+ it('gets resources and applies list prefixes', async () => {
+ const bucket = await client.send(new GetTableBucketCommand({ tableBucketARN: bucketArn }));
+ expect(bucket.name).toBe(bucketName);
+
+ const buckets = await client.send(new ListTableBucketsCommand({ prefix: 'table-bucket' }));
+ expect(buckets.tableBuckets?.some((item) => item.name === bucketName)).toBe(true);
+
+ const fetchedNamespace = await client.send(new GetNamespaceCommand({ tableBucketARN: bucketArn, namespace }));
+ expect(fetchedNamespace.namespace).toEqual([namespace]);
+ const namespaces = await client.send(new ListNamespacesCommand({ tableBucketARN: bucketArn, prefix: 'anal' }));
+ expect(namespaces.namespaces?.some((item) => item.namespace?.includes(namespace))).toBe(true);
+
+ const tables = await client.send(new ListTablesCommand({ tableBucketARN: bucketArn, namespace, prefix: 'events' }));
+ expect(tables.tables?.some((table) => table.name === tableName)).toBe(true);
+ const table = await client.send(new GetTableCommand({ tableBucketARN: bucketArn, namespace, name: tableName }));
+ expect(table.tableARN).toBe(`${bucketArn}/table/${tableName}`);
+ });
+
+ it('round-trips policies and metadata version tokens', async () => {
+ const policy = '{"Version":"2012-10-17","Statement":[]}';
+ await client.send(new PutTableBucketPolicyCommand({ tableBucketARN: bucketArn, resourcePolicy: policy }));
+ expect((await client.send(new GetTableBucketPolicyCommand({ tableBucketARN: bucketArn }))).resourcePolicy).toBe(policy);
+ await client.send(new PutTablePolicyCommand({ tableBucketARN: bucketArn, namespace, name: tableName, resourcePolicy: policy }));
+ expect((await client.send(new GetTablePolicyCommand({ tableBucketARN: bucketArn, namespace, name: tableName }))).resourcePolicy).toBe(policy);
+
+ const updated = await client.send(new UpdateTableMetadataLocationCommand({
+ tableBucketARN: bucketArn,
+ namespace,
+ name: tableName,
+ metadataLocation: `s3://warehouse/${tableName}/v2.metadata.json`,
+ versionToken,
+ }));
+ expect(updated.versionToken).not.toBe(versionToken);
+ expect((await client.send(new GetTableMetadataLocationCommand({
+ tableBucketARN: bucketArn, namespace, name: tableName,
+ }))).metadataLocation).toBe(updated.metadataLocation);
+
+ await expect(client.send(new UpdateTableMetadataLocationCommand({
+ tableBucketARN: bucketArn,
+ namespace,
+ name: tableName,
+ metadataLocation: `s3://warehouse/${tableName}/stale.metadata.json`,
+ versionToken,
+ }))).rejects.toBeInstanceOf(ConflictException);
+ versionToken = updated.versionToken!;
+ });
+
+ it('round-trips typed maintenance configuration maps', async () => {
+ await client.send(new PutTableBucketMaintenanceConfigurationCommand({
+ tableBucketARN: bucketArn,
+ type: 'icebergUnreferencedFileRemoval',
+ value: { status: 'enabled' },
+ }));
+ const bucketMaintenance = await client.send(new GetTableBucketMaintenanceConfigurationCommand({
+ tableBucketARN: bucketArn,
+ }));
+ expect(bucketMaintenance.configuration?.icebergUnreferencedFileRemoval?.status).toBe('enabled');
+
+ await client.send(new PutTableMaintenanceConfigurationCommand({
+ tableBucketARN: bucketArn,
+ namespace,
+ name: tableName,
+ type: 'icebergCompaction',
+ value: { status: 'enabled' },
+ }));
+ const tableMaintenance = await client.send(new GetTableMaintenanceConfigurationCommand({
+ tableBucketARN: bucketArn,
+ namespace,
+ name: tableName,
+ }));
+ expect(tableMaintenance.configuration?.icebergCompaction?.status).toBe('enabled');
+ });
+
+ it('renames a table and rotates its version token', async () => {
+ const originalToken = versionToken;
+ const renamedTableName = `${tableName}-renamed`;
+ await client.send(new RenameTableCommand({
+ tableBucketARN: bucketArn,
+ namespace,
+ name: tableName,
+ newName: renamedTableName,
+ versionToken: originalToken,
+ }));
+
+ const renamed = await client.send(new GetTableCommand({
+ tableBucketARN: bucketArn,
+ namespace,
+ name: renamedTableName,
+ }));
+ expect(renamed.name).toBe(renamedTableName);
+ expect(renamed.versionToken).not.toBe(originalToken);
+ await expect(client.send(new GetTableCommand({ tableBucketARN: bucketArn, namespace, name: tableName })))
+ .rejects.toBeInstanceOf(NotFoundException);
+ tableName = renamedTableName;
+ versionToken = renamed.versionToken!;
+ });
+
+ it('deletes policies and the resource hierarchy', async () => {
+ await client.send(new DeleteTablePolicyCommand({ tableBucketARN: bucketArn, namespace, name: tableName }));
+ await expect(client.send(new GetTablePolicyCommand({ tableBucketARN: bucketArn, namespace, name: tableName })))
+ .rejects.toBeInstanceOf(NotFoundException);
+ await client.send(new DeleteTableBucketPolicyCommand({ tableBucketARN: bucketArn }));
+ await expect(client.send(new GetTableBucketPolicyCommand({ tableBucketARN: bucketArn })))
+ .rejects.toBeInstanceOf(NotFoundException);
+
+ await client.send(new DeleteTableCommand({ tableBucketARN: bucketArn, namespace, name: tableName }));
+ await expect(client.send(new GetTableCommand({ tableBucketARN: bucketArn, namespace, name: tableName })))
+ .rejects.toBeInstanceOf(NotFoundException);
+ await client.send(new DeleteNamespaceCommand({ tableBucketARN: bucketArn, namespace }));
+ await expect(client.send(new GetNamespaceCommand({ tableBucketARN: bucketArn, namespace })))
+ .rejects.toBeInstanceOf(NotFoundException);
+ await client.send(new DeleteTableBucketCommand({ tableBucketARN: bucketArn }));
+ await expect(client.send(new GetTableBucketCommand({ tableBucketARN: bucketArn })))
+ .rejects.toBeInstanceOf(NotFoundException);
+ });
+});
diff --git a/docs/services/index.md b/docs/services/index.md
index f55d22aad9..508ffc9812 100644
--- a/docs/services/index.md
+++ b/docs/services/index.md
@@ -15,6 +15,7 @@ Operation counts are exact. For dispatch-table services (Query and JSON 1.1) eac
| [SNS](sns.md) | `POST /` with `Action=` param | Query / JSON | 17 |
| [S3](s3.md) | `/{bucket}/{key}` | REST XML | 58 |
| [S3 Vectors](s3vectors.md) | `POST /{OperationName}` | REST JSON | 12 |
+| [S3 Tables](s3tables.md) | `/buckets`, `/namespaces/*`, `/tables/*` | REST JSON | 25 |
| [DynamoDB](dynamodb.md) | `POST /` + `X-Amz-Target: DynamoDB_20120810.*` | JSON 1.1 | 28 |
| [DynamoDB Streams](dynamodb.md#streams) | `POST /` + `X-Amz-Target: DynamoDBStreams_20120810.*` | JSON 1.1 | 4 |
| [Lambda](lambda.md) | `/2015-03-31/functions/...` | REST JSON | 30 |
diff --git a/docs/services/s3tables.md b/docs/services/s3tables.md
new file mode 100644
index 0000000000..5060235717
--- /dev/null
+++ b/docs/services/s3tables.md
@@ -0,0 +1,60 @@
+# S3 Tables
+
+**Protocol:** REST JSON
+**Signing service:** `s3tables`
+**Endpoint:** `http://localhost:4566`
+
+Floci emulates the S3 Tables control plane for local development, Terraform
+convergence, and SDK integration tests. It is a separate AWS service from S3:
+S3 Tables requests are signed as `s3tables` and use REST JSON routes such as
+`/buckets` and `/tables/{tableBucketARN}/{namespace}`.
+
+## Metadata-only scope
+
+This service stores table-bucket, namespace, table, policy, maintenance
+configuration, and metadata-location state. It does **not** run an Apache
+Iceberg engine or create data-plane artifacts: manifests, warehouse objects,
+queries, compaction, snapshot expiry, replication, encryption-management, and
+metrics are intentionally outside this implementation.
+
+## Supported operations
+
+| Area | Operations |
+|---|---|
+| Table buckets | CreateTableBucket, GetTableBucket, ListTableBuckets, DeleteTableBucket |
+| Bucket policy | PutTableBucketPolicy, GetTableBucketPolicy, DeleteTableBucketPolicy |
+| Bucket maintenance | PutTableBucketMaintenanceConfiguration, GetTableBucketMaintenanceConfiguration |
+| Namespaces | CreateNamespace, GetNamespace, ListNamespaces, DeleteNamespace |
+| Tables | CreateTable, GetTable, ListTables, DeleteTable, RenameTable |
+| Metadata location | GetTableMetadataLocation, UpdateTableMetadataLocation |
+| Table policy | PutTablePolicy, GetTablePolicy, DeleteTablePolicy |
+| Table maintenance | PutTableMaintenanceConfiguration, GetTableMaintenanceConfiguration |
+
+Tables must use `ICEBERG` format. `UpdateTableMetadataLocation` implements
+optimistic concurrency: supply the table's current `versionToken`; a stale
+token returns `ConflictException`.
+
+## Example
+
+```bash
+export AWS_ENDPOINT_URL=http://localhost:4566
+export AWS_DEFAULT_REGION=us-east-1
+export AWS_ACCESS_KEY_ID=test
+export AWS_SECRET_ACCESS_KEY=test
+
+bucket_arn=$(aws s3tables create-table-bucket --name local-warehouse --query arn --output text)
+aws s3tables create-namespace --table-bucket-arn "$bucket_arn" --namespace analytics
+aws s3tables create-table \
+ --table-bucket-arn "$bucket_arn" \
+ --namespace analytics \
+ --name events \
+ --format ICEBERG
+```
+
+## Configuration
+
+| Variable | Default | Description |
+|---|---|---|
+| `FLOCI_SERVICES_S3TABLES_ENABLED` | `true` | Enables the S3 Tables REST JSON service. |
+| `FLOCI_STORAGE_SERVICES_S3TABLES_MODE` | Global storage mode | Optional per-service storage-mode override. |
+| `FLOCI_STORAGE_SERVICES_S3TABLES_FLUSH_INTERVAL_MS` | `5000` | Persistence flush interval for hybrid storage. |
diff --git a/mkdocs.yml b/mkdocs.yml
index 015029f406..ba581cbe8e 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -79,6 +79,7 @@ nav:
- SNS: services/sns.md
- SES: services/ses.md
- S3: services/s3.md
+ - S3 Tables: services/s3tables.md
- DynamoDB: services/dynamodb.md
- Lambda: services/lambda.md
- Lambda MicroVMs: services/lambda-microvms.md
diff --git a/src/main/java/io/github/hectorvent/floci/config/EmulatorConfig.java b/src/main/java/io/github/hectorvent/floci/config/EmulatorConfig.java
index 3704be00fd..4b4b75016e 100644
--- a/src/main/java/io/github/hectorvent/floci/config/EmulatorConfig.java
+++ b/src/main/java/io/github/hectorvent/floci/config/EmulatorConfig.java
@@ -272,6 +272,7 @@ public interface EmulatorConfig {
LightsailStorageConfig lightsail();
CodePipelineStorageConfig codepipeline();
S3VectorsStorageConfig s3vectors();
+ S3TablesStorageConfig s3tables();
EcsStorageConfig ecs();
CodeBuildStorageConfig codebuild();
ConfigStorageConfig config();
@@ -440,6 +441,13 @@ public interface EmulatorConfig {
long flushIntervalMs();
}
+ interface S3TablesStorageConfig {
+ Optional mode();
+
+ @WithDefault("5000")
+ long flushIntervalMs();
+ }
+
interface EcsStorageConfig {
Optional mode();
@@ -595,6 +603,7 @@ public interface EmulatorConfig {
LightsailServiceConfig lightsail();
UiServiceConfig ui();
S3VectorsServiceConfig s3vectors();
+ S3TablesServiceConfig s3tables();
IotServiceConfig iot();
IotDataServiceConfig iotdata();
RumServiceConfig rum();
@@ -645,6 +654,11 @@ public interface EmulatorConfig {
boolean enabled();
}
+ interface S3TablesServiceConfig {
+ @WithDefault("true")
+ boolean enabled();
+ }
+
interface TransferServiceConfig {
@WithDefault("true")
boolean enabled();
diff --git a/src/main/java/io/github/hectorvent/floci/core/common/ResolvedServiceCatalog.java b/src/main/java/io/github/hectorvent/floci/core/common/ResolvedServiceCatalog.java
index b5d9384ac0..fd8e6f5428 100644
--- a/src/main/java/io/github/hectorvent/floci/core/common/ResolvedServiceCatalog.java
+++ b/src/main/java/io/github/hectorvent/floci/core/common/ResolvedServiceCatalog.java
@@ -25,6 +25,7 @@ import io.github.hectorvent.floci.services.appsync.AppSyncController;
import io.github.hectorvent.floci.services.rdsdata.RdsDataController;
import io.github.hectorvent.floci.services.rum.RumController;
import io.github.hectorvent.floci.services.s3vectors.S3VectorsController;
+import io.github.hectorvent.floci.services.s3tables.S3TablesController;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
@@ -417,6 +418,11 @@ public class ResolvedServiceCatalog {
config.storage().services().s3vectors().flushIntervalMs(), null, ServiceProtocol.REST_JSON,
protocols(ServiceProtocol.REST_JSON),
Set.of(), Set.of("s3vectors"), Set.of(), Set.of(S3VectorsController.class)),
+ descriptor("s3tables", "s3tables", config.services().s3tables().enabled(), true,
+ "s3tables", storageMode(config.storage().services().s3tables().mode(), config.storage().mode()),
+ config.storage().services().s3tables().flushIntervalMs(), null, ServiceProtocol.REST_JSON,
+ protocols(ServiceProtocol.REST_JSON),
+ Set.of(), Set.of("s3tables"), Set.of(), Set.of(S3TablesController.class)),
descriptor("iot", "iot", config.services().iot().enabled(), true,
"iot", config.storage().mode(), 5000L, null, ServiceProtocol.REST_JSON,
protocols(ServiceProtocol.REST_JSON),
diff --git a/src/main/java/io/github/hectorvent/floci/services/s3tables/S3TablesController.java b/src/main/java/io/github/hectorvent/floci/services/s3tables/S3TablesController.java
new file mode 100644
index 0000000000..5699ce0f8a
--- /dev/null
+++ b/src/main/java/io/github/hectorvent/floci/services/s3tables/S3TablesController.java
@@ -0,0 +1,325 @@
+package io.github.hectorvent.floci.services.s3tables;
+
+import io.github.hectorvent.floci.core.common.RegionResolver;
+import io.github.hectorvent.floci.services.s3tables.model.Namespace;
+import io.github.hectorvent.floci.services.s3tables.model.S3Table;
+import io.github.hectorvent.floci.services.s3tables.model.TableBucket;
+import jakarta.inject.Inject;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.DELETE;
+import jakarta.ws.rs.Encoded;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.PUT;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.Context;
+import jakarta.ws.rs.core.HttpHeaders;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
+
+import java.net.URLDecoder;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+@Path("/")
+@Produces(MediaType.APPLICATION_JSON)
+@Consumes(MediaType.APPLICATION_JSON)
+public class S3TablesController {
+ private final S3TablesService service;
+ private final RegionResolver regionResolver;
+
+ @Inject
+ public S3TablesController(S3TablesService service, RegionResolver regionResolver) {
+ this.service = service;
+ this.regionResolver = regionResolver;
+ }
+
+ @PUT
+ @Path("/buckets")
+ public Response createTableBucket(@Context HttpHeaders headers, Map request) {
+ TableBucket bucket = service.createTableBucket(string(request, "name"), request.get("encryptionConfiguration"),
+ request.get("storageClassConfiguration"), stringMap(request.get("tags")), region(headers));
+ return Response.ok(Map.of("arn", bucket.getArn())).build();
+ }
+
+ @GET
+ @Path("/buckets")
+ public Response listTableBuckets(@Context HttpHeaders headers, @QueryParam("prefix") String prefix) {
+ List