

# Helper files for using Amazon S3 Storage Lens for Tables

Use the following JSON files and their key inputs for your examples.

## Amazon S3 Storage Lens for Tables example configuration in JSON
<a name="s3-tables-storage-lens-helper-files-config"></a>

**Example `config.json`**  
The `config.json` file contains the details of an Amazon S3 Storage Lens for Tables configuration. To use the following example, replace the `{{user input placeholders}}` with your own information.  

```json
{
  "id": "{{SampleS3StorageLensForTablesConfiguration}}",
  "isEnabled": {{true}},
  "advancedMetricsCategories": [
    "{{StorageMetrics}}",
    "{{ActivityMetrics}}",
    "{{MaintenanceMetrics}}"
  ],
  "include": {
    "tableBuckets": [
      "arn:aws:s3tables:{{us-east-1}}:{{111122223333}}:bucket/{{example-table-bucket}}"
    ],
    "regions": [
      "{{us-east-1}}"
    ]
  },
  "dataExport": {
    "s3BucketDestination": {
      "format": "{{CSV}}",
      "outputSchemaVersion": "{{V_1}}",
      "accountId": "{{111122223333}}",
      "arn": "arn:aws:s3:::{{{{amzn-s3-demo-destination-bucket}}}}",
      "prefix": "{{prefix-for-your-export-destination}}",
      "encryption": {
        "sseAlgorithm": "{{AES256}}"
      }
    },
    "storageLensTableDestination": {
      "isEnabled": {{true}}
    },
    "cloudWatchMetrics": {
      "isEnabled": {{true}}
    }
  }
}
```

## Amazon S3 Storage Lens for Tables example tags configuration in JSON
<a name="s3-tables-storage-lens-helper-files-tags"></a>

**Example `tags.json`**  
The `tags.json` file contains the tags that you want to apply to your Amazon S3 Storage Lens for Tables configuration. To use this example, replace the `{{user input placeholders}}` with your own information. For Amazon S3 Storage Lens for Tables, you apply tags inline through the `tags` parameter of `PutStorageLensConfiguration`. See [Managing AWS resource tags with Amazon S3 Storage Lens for Tables](s3-tables-storage-lens-manage-tags.md).  

```json
{
    "{{key1}}": "{{value1}}",
    "{{key2}}": "{{value2}}"
}
```

## Amazon S3 Storage Lens for Tables example configuration IAM permissions
<a name="s3-tables-storage-lens-helper-files-permissions"></a>

**Example `permissions.json`**  
This example policy shows an Amazon S3 Storage Lens for Tables IAM `permissions.json` file that grants full management of configurations. Replace `{{us-east-1}}` and `{{your-account-id}}` with your own values. For the full permissions reference, see [Setting Amazon S3 Storage Lens for Tables permissions](s3-tables-storage-lens-permissions.md).  

```json
{
  "Version": "2012-10-17",		 	 	 
  "Statement": [
    {
      "Sid": "ManageStorageLensForTablesConfigurations",
      "Effect": "Allow",
      "Action": [
        "s3tables:PutStorageLensConfiguration",
        "s3tables:GetStorageLensConfiguration",
        "s3tables:DeleteStorageLensConfiguration",
        "s3tables:ListStorageLensConfigurations",
        "s3tables:TagResource",
        "s3tables:UntagResource",
        "s3tables:ListTagsForResource"
      ],
      "Resource": "arn:aws:s3tables:{{us-east-1}}:{{your-account-id}}:storage-lens/*"
    }
  ]
}
```