

# Table naming for S3 Storage Lens export to S3 Tables

When you export S3 Storage Lens metrics to S3 Tables, the tables are organized using Apache Iceberg catalog conventions with specific naming patterns to ensure compatibility and organization.

## Table location structure
<a name="s3-tables-storage-lens-s3-tables-naming-location"></a>

The complete table location follows this pattern:

```
s3tablescatalog/aws-s3/<namespace>/<table-name>
```

### Table bucket name
<a name="s3-tables-storage-lens-s3-tables-naming-bucket"></a>

 **Table Bucket:** `aws-s3` 

The S3 Storage Lens export uses the `aws-s3` table bucket, which is the designated bucket for AWS S3-related system tables.

### Catalog name
<a name="s3-tables-storage-lens-s3-tables-naming-catalog"></a>

 **Catalog:** `s3tablescatalog/aws-s3` 

S3 Storage Lens for Tables stores your exported tables in the `s3tablescatalog/aws-s3` catalog, which is the catalog for the AWS-managed `aws-s3` table bucket.

## Namespace naming convention
<a name="s3-tables-storage-lens-s3-tables-naming-namespace"></a>

Namespaces organize tables within the catalog. For S3 Storage Lens, the namespace is derived from your Storage Lens configuration ID.

### Standard namespace format
<a name="s3-tables-storage-lens-s3-tables-naming-namespace-standard"></a>

For Storage Lens configuration IDs that contain only lowercase letters, numbers, hyphens (`-`), and underscores (`_`): 

```
s3tables_lens_<configuration-id>_exp
```

 **Example:** If your configuration ID is `my_lens_config`, the namespace is:

```
s3tables_lens_my_lens_config_exp
```

### Namespace format with other characters
<a name="s3-tables-storage-lens-s3-tables-naming-namespace-dots"></a>

Storage Lens configuration IDs can also contain uppercase letters (`A-Z`) and dots (`.`). When your configuration ID contains an uppercase letter or a dot, the ID is converted to lowercase, each dot (`.`) is replaced with an underscore (`_`), and a hash suffix is added for uniqueness:

```
s3tables_lens_<normalized-configuration-id>_exp_<7-char-hash>
```

 **Example:** If your configuration ID is `testConfigId`, the namespace is:

```
s3tables_lens_testconfigid_exp_3321378
```

Where the trailing value is the first 7 characters of the SHA-1 hash of the original configuration ID.

## Complete examples
<a name="s3-tables-storage-lens-s3-tables-naming-examples"></a>

For a Storage Lens configuration with ID `production_metrics`: 
+  **Table Bucket:** `aws-s3` 
+  **Catalog:** `s3tablescatalog/aws-s3` 
+  **Namespace:** `s3tables_lens_production_metrics_exp` 
+  **Full Path:** `s3tablescatalog/aws-s3/s3tables_lens_production_metrics_exp/<table-name>` 

For a Storage Lens configuration with ID `prod.us.east.metrics`: 
+  **Table Bucket:** `aws-s3` 
+  **Catalog:** `s3tablescatalog/aws-s3` 
+  **Namespace:** `s3tables_lens_prod_us_east_metrics_exp_f8e9a1b` (with hash)
+  **Full Path:** `s3tablescatalog/aws-s3/s3tables_lens_prod_us_east_metrics_exp_f8e9a1b/<table-name>` 

## Table types
<a name="s3-tables-storage-lens-s3-tables-naming-types"></a>

The following table shows the system tables created for S3 Storage Lens for Tables exports:


| Catalog | Namespace | S3 table name | Description | 
| --- | --- | --- | --- | 
| s3tablescatalog/aws-s3 | s3tables\_lens\_<configuration-id>\_exp[\_<hash>] | storage\_metrics | Contains the storage metrics for your Storage Lens configuration. This table is always present. | 
| s3tablescatalog/aws-s3 | s3tables\_lens\_<configuration-id>\_exp[\_<hash>] | table\_properties | Contains the table property metrics for your Storage Lens configuration. This table is always present. | 
| s3tablescatalog/aws-s3 | s3tables\_lens\_<configuration-id>\_exp[\_<hash>] | activity\_metrics | Contains the activity metrics for your Storage Lens configuration. This table is present when the activity metrics category is enabled with advanced metrics. | 
| s3tablescatalog/aws-s3 | s3tables\_lens\_<configuration-id>\_exp[\_<hash>] | table\_health\_metrics | Contains the table health metrics (live-table and partition metrics) for your Storage Lens configuration. This table is present when the storage metrics category is enabled with advanced metrics. | 
| s3tablescatalog/aws-s3 | s3tables\_lens\_<configuration-id>\_exp[\_<hash>] | events | Contains the table maintenance events for your Storage Lens configuration. This table is present when the maintenance metrics category is enabled with advanced metrics. | 

## Next steps
<a name="s3-tables-storage-lens-s3-tables-naming-next-steps"></a>
+ Learn about [Amazon S3 Storage Lens for Tables export column schemas](s3-tables-storage-lens-s3-tables-schemas.md) 
+ Learn about [Permissions for S3 Storage Lens tables](s3-tables-storage-lens-s3-tables-permissions.md) 