

# Setting Amazon S3 Storage Lens for Tables permissions

Amazon S3 Storage Lens for Tables requires permissions in AWS Identity and Access Management (IAM) to authorize access to Amazon S3 Storage Lens for Tables actions. To grant these permissions, you use an identity-based IAM policy that you attach to IAM users, groups, or roles.

The IAM user or role must belong to the account that created or owns the configuration, unless both of the following conditions are true:
+ Your account is a member of AWS Organizations.
+ You were given access to create organization-level configurations by your management account as a delegated administrator.

**Note**  
You can't use your account's root user credentials to view Amazon S3 Storage Lens for Tables dashboards. To access the dashboards, you must grant the required IAM permissions to a new or existing IAM user. Then, sign in with those user credentials. For more information, see [Security best practices in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html) in the *IAM User Guide*.
Using Amazon S3 Storage Lens for Tables on the Amazon S3 console can require multiple permissions. For example, to create or edit a configuration on the console, you need the following permissions:  
`s3tables:ListStorageLensConfigurations`
`s3tables:GetStorageLensConfiguration`
`s3tables:PutStorageLensConfiguration`

**Topics**
+ [Setting account permissions to use Amazon S3 Storage Lens for Tables](#s3-tables-storage-lens-permissions-account)
+ [Setting permissions to use Amazon S3 Storage Lens for Tables with AWS Organizations](#s3-tables-storage-lens-permissions-organizations)

## Setting account permissions to use Amazon S3 Storage Lens for Tables
<a name="s3-tables-storage-lens-permissions-account"></a>

To create and manage Amazon S3 Storage Lens for Tables configurations, you must have the following permissions, depending on which actions you want to perform:

The following table shows Amazon S3 Storage Lens for Tables related IAM permissions.


| Action | IAM permissions | 
| --- | --- | 
| Create or update a configuration in the Amazon S3 console. | `s3tables:ListStorageLensConfigurations`<br />`s3tables:GetStorageLensConfiguration`<br />`s3tables:PutStorageLensConfiguration` | 
| View a configuration in the Amazon S3 console. | `s3tables:ListStorageLensConfigurations`<br />`s3tables:GetStorageLensConfiguration`<br />`s3tables:GetStorageLensDashboard` | 
| Delete a configuration in the Amazon S3 console. | `s3tables:ListStorageLensConfigurations`<br />`s3tables:GetStorageLensConfiguration`<br />`s3tables:DeleteStorageLensConfiguration` | 
| Create or update a configuration by using the AWS CLI or an AWS SDK. | `s3tables:PutStorageLensConfiguration` | 
| View a configuration by using the AWS CLI or an AWS SDK. | `s3tables:GetStorageLensConfiguration` | 
| List configurations by using the AWS CLI or an AWS SDK. | `s3tables:ListStorageLensConfigurations` | 
| Delete a configuration by using the AWS CLI or an AWS SDK. | `s3tables:DeleteStorageLensConfiguration` | 
| Add or update resource tags on a configuration by using the AWS CLI or an AWS SDK. | `s3tables:TagResource` | 
| Remove resource tags from a configuration by using the AWS CLI or an AWS SDK. | `s3tables:UntagResource` | 
| List the resource tags on a configuration by using the AWS CLI or an AWS SDK. | `s3tables:ListTagsForResource` | 

**Note**  
You can use resource tags in an IAM policy to manage permissions. Amazon S3 Storage Lens for Tables configurations are taggable resources, so the standard `aws:RequestTag/${TagKey}`, `aws:ResourceTag/${TagKey}`, and `aws:TagKeys` condition keys are supported.
An IAM user or role with these permissions can see metrics from table buckets, namespaces, and tables that they might not have direct permission to read or list objects from.
For metrics exports, which are stored in a bucket in your account, read access to the exported files is granted by using the existing `s3:GetObject` permission in the IAM policy. For the destination bucket policy and the AWS KMS key policy that let Amazon S3 deliver your exports, see [Viewing Amazon S3 Storage Lens for Tables metrics using a data export](s3-tables-storage-lens-view-metrics-export.md).

## Setting permissions to use Amazon S3 Storage Lens for Tables with AWS Organizations
<a name="s3-tables-storage-lens-permissions-organizations"></a>

You can use Amazon S3 Storage Lens for Tables to collect metrics for all accounts that are part of your AWS Organizations hierarchy. The following table shows the actions and permissions related to using Amazon S3 Storage Lens for Tables with Organizations.


| Action | IAM permissions | 
| --- | --- | 
| Enable trusted access for Amazon S3 Storage Lens for Tables for your organization. | `organizations:EnableAWSServiceAccess` | 
| Disable trusted access for Amazon S3 Storage Lens for Tables for your organization. | `organizations:DisableAWSServiceAccess` | 
| Register a delegated administrator to create organization-level configurations. | `organizations:RegisterDelegatedAdministrator` | 
| Deregister a delegated administrator. | `organizations:DeregisterDelegatedAdministrator` | 
| Additional permissions to create organization-level configurations. | `organizations:DescribeOrganization`<br />`organizations:ListAccounts`<br />`organizations:ListAWSServiceAccessForOrganization`<br />`organizations:ListDelegatedAdministrators`<br />`iam:CreateServiceLinkedRole` | 