Skip to content

aws.s3control.get_storage_lens_configuration

Example SQL Queries

SELECT * FROM
aws.s3control.get_storage_lens_configuration
WHERE
"config_id" = 'VALUE'
AND "account_id" = 'VALUE';

Description

This operation is not supported by directory buckets.

Gets the Amazon S3 Storage Lens configuration. For more information, see Assessing your storage activity and usage with Amazon S3 Storage Lens in the Amazon S3 User Guide. For a complete list of S3 Storage Lens metrics, see S3 Storage Lens metrics glossary in the Amazon S3 User Guide.

To use this action, you must have permission to perform the s3:GetStorageLensConfiguration action. For more information, see Setting permissions to use Amazon S3 Storage Lens in the Amazon S3 User Guide.

Table Definition

Column NameColumn Data Type
account_id Required Input Column

The account ID of the requester.

VARCHAR
config_id Required Input Column

The ID of the Amazon S3 Storage Lens configuration.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

storage_lens_configuration

The S3 Storage Lens configuration requested.

STRUCT(
"id" VARCHAR,
"account_level" STRUCT(
"activity_metrics" STRUCT(
"is_enabled" BOOLEAN
),
"bucket_level" STRUCT(
"activity_metrics" STRUCT(
"is_enabled" BOOLEAN
),
"prefix_level" STRUCT(
"storage_metrics" STRUCT(
"is_enabled" BOOLEAN,
"selection_criteria" STRUCT(
"delimiter" VARCHAR,
"max_depth" BIGINT,
"min_storage_bytes_percentage" DOUBLE
)
)
),
"advanced_cost_optimization_metrics" STRUCT(
"is_enabled" BOOLEAN
),
"advanced_data_protection_metrics" STRUCT(
"is_enabled" BOOLEAN
),
"detailed_status_codes_metrics" STRUCT(
"is_enabled" BOOLEAN
)
),
"advanced_cost_optimization_metrics" STRUCT(
"is_enabled" BOOLEAN
),
"advanced_data_protection_metrics" STRUCT(
"is_enabled" BOOLEAN
),
"detailed_status_codes_metrics" STRUCT(
"is_enabled" BOOLEAN
),
"storage_lens_group_level" STRUCT(
"selection_criteria" STRUCT(
"include" VARCHAR[],
"exclude" VARCHAR[]
)
)
),
"include" STRUCT(
"buckets" VARCHAR[],
"regions" VARCHAR[]
),
"exclude" STRUCT(
"buckets" VARCHAR[],
"regions" VARCHAR[]
),
"data_export" STRUCT(
"s3_bucket_destination" STRUCT(
"format" VARCHAR,
"output_schema_version" VARCHAR,
"account_id" VARCHAR,
"arn" VARCHAR,
"prefix" VARCHAR,
"encryption" STRUCT(
"sses3" BOOLEAN,
"ssekms" STRUCT(
"key_id" VARCHAR
)
)
),
"cloud_watch_metrics" STRUCT(
"is_enabled" BOOLEAN
)
),
"is_enabled" BOOLEAN,
"aws_org" STRUCT(
"arn" VARCHAR
),
"storage_lens_arn" VARCHAR
)
Show child fields
storage_lens_configuration.account_level

A container for all the account-level configurations of your S3 Storage Lens configuration.

Show child fields
storage_lens_configuration.account_level.activity_metrics

A container element for S3 Storage Lens activity metrics.

Show child fields
storage_lens_configuration.account_level.activity_metrics.is_enabled

A container that indicates whether activity metrics are enabled.

storage_lens_configuration.account_level.advanced_cost_optimization_metrics

A container element for S3 Storage Lens advanced cost-optimization metrics.

Show child fields
storage_lens_configuration.account_level.advanced_cost_optimization_metrics.is_enabled

A container that indicates whether advanced cost-optimization metrics are enabled.

storage_lens_configuration.account_level.advanced_data_protection_metrics

A container element for S3 Storage Lens advanced data-protection metrics.

Show child fields
storage_lens_configuration.account_level.advanced_data_protection_metrics.is_enabled

A container that indicates whether advanced data-protection metrics are enabled.

storage_lens_configuration.account_level.bucket_level

A container element for the S3 Storage Lens bucket-level configuration.

Show child fields
storage_lens_configuration.account_level.bucket_level.activity_metrics

A container for the bucket-level activity metrics for S3 Storage Lens.

Show child fields
storage_lens_configuration.account_level.bucket_level.activity_metrics.is_enabled

A container that indicates whether activity metrics are enabled.

storage_lens_configuration.account_level.bucket_level.advanced_cost_optimization_metrics

A container for bucket-level advanced cost-optimization metrics for S3 Storage Lens.

Show child fields
storage_lens_configuration.account_level.bucket_level.advanced_cost_optimization_metrics.is_enabled

A container that indicates whether advanced cost-optimization metrics are enabled.

storage_lens_configuration.account_level.bucket_level.advanced_data_protection_metrics

A container for bucket-level advanced data-protection metrics for S3 Storage Lens.

Show child fields
storage_lens_configuration.account_level.bucket_level.advanced_data_protection_metrics.is_enabled

A container that indicates whether advanced data-protection metrics are enabled.

storage_lens_configuration.account_level.bucket_level.detailed_status_codes_metrics

A container for bucket-level detailed status code metrics for S3 Storage Lens.

Show child fields
storage_lens_configuration.account_level.bucket_level.detailed_status_codes_metrics.is_enabled

A container that indicates whether detailed status code metrics are enabled.

storage_lens_configuration.account_level.bucket_level.prefix_level

A container for the prefix-level metrics for S3 Storage Lens.

Show child fields
storage_lens_configuration.account_level.bucket_level.prefix_level.storage_metrics

A container for the prefix-level storage metrics for S3 Storage Lens.

Show child fields
storage_lens_configuration.account_level.bucket_level.prefix_level.storage_metrics.is_enabled

A container for whether prefix-level storage metrics are enabled.

storage_lens_configuration.account_level.bucket_level.prefix_level.storage_metrics.selection_criteria

Show child fields
storage_lens_configuration.account_level.bucket_level.prefix_level.storage_metrics.selection_criteria.delimiter

A container for the delimiter of the selection criteria being used.

storage_lens_configuration.account_level.bucket_level.prefix_level.storage_metrics.selection_criteria.max_depth

The max depth of the selection criteria

storage_lens_configuration.account_level.bucket_level.prefix_level.storage_metrics.selection_criteria.min_storage_bytes_percentage

The minimum number of storage bytes percentage whose metrics will be selected.

You must choose a value greater than or equal to 1.0.

storage_lens_configuration.account_level.detailed_status_codes_metrics

A container element for detailed status code metrics.

Show child fields
storage_lens_configuration.account_level.detailed_status_codes_metrics.is_enabled

A container that indicates whether detailed status code metrics are enabled.

storage_lens_configuration.account_level.storage_lens_group_level

A container element for S3 Storage Lens groups metrics.

Show child fields
storage_lens_configuration.account_level.storage_lens_group_level.selection_criteria

Indicates which Storage Lens group ARNs to include or exclude in the Storage Lens group aggregation. If this value is left null, then all Storage Lens groups are selected.

Show child fields
storage_lens_configuration.account_level.storage_lens_group_level.selection_criteria.exclude[]
storage_lens_configuration.account_level.storage_lens_group_level.selection_criteria.include[]
storage_lens_configuration.aws_org

A container for the Amazon Web Services organization for this S3 Storage Lens configuration.

Show child fields
storage_lens_configuration.aws_org.arn

A container for the Amazon Resource Name (ARN) of the Amazon Web Services organization. This property is read-only and follows the following format: arn:aws:organizations:us-east-1:example-account-id:organization/o-ex2l495dck

storage_lens_configuration.data_export

A container to specify the properties of your S3 Storage Lens metrics export including, the destination, schema and format.

Show child fields
storage_lens_configuration.data_export.cloud_watch_metrics

A container for enabling Amazon CloudWatch publishing for S3 Storage Lens metrics.

Show child fields
storage_lens_configuration.data_export.cloud_watch_metrics.is_enabled

A container that indicates whether CloudWatch publishing for S3 Storage Lens metrics is enabled. A value of true indicates that CloudWatch publishing for S3 Storage Lens metrics is enabled.

storage_lens_configuration.data_export.s3_bucket_destination

A container for the bucket where the S3 Storage Lens metrics export will be located.

This bucket must be located in the same Region as the storage lens configuration.

Show child fields
storage_lens_configuration.data_export.s3_bucket_destination.account_id

The account ID of the owner of the S3 Storage Lens metrics export bucket.

storage_lens_configuration.data_export.s3_bucket_destination.arn

The Amazon Resource Name (ARN) of the bucket. This property is read-only and follows the following format: arn:aws:s3:us-east-1:example-account-id:bucket/your-destination-bucket-name

storage_lens_configuration.data_export.s3_bucket_destination.encryption

The container for the type encryption of the metrics exports in this bucket.

Show child fields
storage_lens_configuration.data_export.s3_bucket_destination.encryption.ssekms

Show child fields
storage_lens_configuration.data_export.s3_bucket_destination.encryption.ssekms.key_id

A container for the ARN of the SSE-KMS encryption. This property is read-only and follows the following format: arn:aws:kms:us-east-1:example-account-id:key/example-9a73-4afc-8d29-8f5900cef44e

storage_lens_configuration.data_export.s3_bucket_destination.encryption.sses3

storage_lens_configuration.data_export.s3_bucket_destination.format

storage_lens_configuration.data_export.s3_bucket_destination.output_schema_version

The schema version of the export file.

storage_lens_configuration.data_export.s3_bucket_destination.prefix

The prefix of the destination bucket where the metrics export will be delivered.

storage_lens_configuration.exclude

A container for what is excluded in this configuration. This container can only be valid if there is no Include container submitted, and it's not empty.

Show child fields
storage_lens_configuration.exclude.buckets[]
storage_lens_configuration.exclude.regions[]
storage_lens_configuration.id

A container for the Amazon S3 Storage Lens configuration ID.

storage_lens_configuration.include

A container for what is included in this configuration. This container can only be valid if there is no Exclude container submitted, and it's not empty.

Show child fields
storage_lens_configuration.include.buckets[]
storage_lens_configuration.include.regions[]
storage_lens_configuration.is_enabled

A container for whether the S3 Storage Lens configuration is enabled.

storage_lens_configuration.storage_lens_arn

The Amazon Resource Name (ARN) of the S3 Storage Lens configuration. This property is read-only and follows the following format: arn:aws:s3:us-east-1:example-account-id:storage-lens/your-dashboard-name