Disabling trusted access for Amazon S3 Storage Lens for Tables
Removing an account as a delegated administrator or disabling trusted access limits the account owner's Amazon S3 Storage Lens for Tables dashboard metrics to work only on an account level. Each account holder can then see only the benefits of Amazon S3 Storage Lens for Tables through the limited scope of their account, and not their entire organization.
When you disable trusted access in Amazon S3 Storage Lens for Tables, any dashboards requiring trusted access are no longer updated. Any organizational dashboards that are created are also no longer updated. Instead, you're only able to query historic data for the Amazon S3 Storage Lens for Tables dashboard, while the data is still available.
-
Disabling trusted access for Amazon S3 Storage Lens for Tables also automatically stops all organization-level dashboards from collecting and aggregating storage metrics. This is because Amazon S3 Storage Lens for Tables no longer has trusted access to the organization accounts.
-
Your management and delegated administrator accounts can still view existing metrics for any disabled dashboards until the metrics age out: 14 days for free tier metrics and 15 months for advanced tier metrics.
Before you can disable trusted access, you must deregister all delegated administrators for Amazon S3 Storage Lens. You must be signed in to the organization's management account.
To disable trusted access for Amazon S3 Storage Lens for Tables
Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/
. -
Open the Account and organization settings page.
-
In the AWS Organizations settings for Storage Lens section, choose Edit trusted access.
-
On the AWS Organizations trusted access page, under Trusted access, choose Disable.
-
Choose Save changes.
Example
The following example disables trusted access for Amazon S3 Storage Lens for Tables using the AWS CLI.
aws organizations disable-aws-service-access --service-principal storage-lens.s3.amazonaws.com
Example– Disable AWS Organizations trusted access for Amazon S3 Storage Lens for Tables
The following example shows you how to disable AWS Organizations trusted access for Amazon S3 Storage
Lens for Tables in SDK for Java. To use this example, replace the with your own information.user input
placeholders
import software.amazon.awssdk.auth.credentials.ProfileCredentialsProvider; import software.amazon.awssdk.regions.Region; import software.amazon.awssdk.services.organizations.OrganizationsClient; import software.amazon.awssdk.services.organizations.model.DisableAwsServiceAccessRequest; import software.amazon.awssdk.services.organizations.model.OrganizationsException; import software.amazon.awssdk.core.exception.SdkClientException; public class DisableOrganizationsTrustedAccess { private static final String S3_STORAGE_LENS_TABLES_SERVICE_PRINCIPAL = "storage-lens.s3.amazonaws.com"; public static void main(String[] args) { try (OrganizationsClient organizationsClient = OrganizationsClient.builder() .credentialsProvider(ProfileCredentialsProvider.create()) .region(Region.US_EAST_1) .build()) { // Make sure to remove any existing delegated administrator for Amazon S3 Storage Lens for Tables // before disabling access; otherwise, the request will fail. organizationsClient.disableAWSServiceAccess(DisableAwsServiceAccessRequest.builder() .servicePrincipal(S3_STORAGE_LENS_TABLES_SERVICE_PRINCIPAL) .build()); } catch (OrganizationsException e) { // The call was transmitted successfully, but AWS Organizations couldn't process // it and returned an error response. e.printStackTrace(); } catch (SdkClientException e) { // AWS Organizations couldn't be contacted for a response, or the client // couldn't parse the response from AWS Organizations. e.printStackTrace(); } } }