Skip to content

aws.s3.get_bucket_inventory_configuration

Example SQL Queries

SELECT * FROM
aws.s3.get_bucket_inventory_configuration
WHERE
"bucket" = 'VALUE'
AND "id" = 'VALUE';

Description

This operation is not supported by directory buckets.

Returns an inventory configuration (identified by the inventory configuration ID) from the bucket.

To use this operation, you must have permissions to perform the s3:GetInventoryConfiguration action. The bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources.

For information about the Amazon S3 inventory feature, see Amazon S3 Inventory.

Table Definition

Column NameColumn Data Type
bucket Required Input Column

The name of the bucket containing the inventory configuration to retrieve.

VARCHAR
id Required Input Column

The ID used to identify the inventory configuration.

VARCHAR
expected_bucket_owner Input Column

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

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.

inventory_configuration

Specifies the inventory configuration.

STRUCT(
"destination" STRUCT(
"s3_bucket_destination" STRUCT(
"account_id" VARCHAR,
"bucket" VARCHAR,
"format" VARCHAR,
"prefix" VARCHAR,
"encryption" STRUCT(
"sses3" BOOLEAN,
"ssekms" STRUCT(
"key_id" VARCHAR
)
)
)
),
"is_enabled" BOOLEAN,
"filter" STRUCT(
"prefix" VARCHAR
),
"id" VARCHAR,
"included_object_versions" VARCHAR,
"optional_fields" VARCHAR[],
"schedule" STRUCT(
"frequency" VARCHAR
)
)
Show child fields
inventory_configuration.destination

Contains information about where to publish the inventory results.

Show child fields
inventory_configuration.destination.s3_bucket_destination

Contains the bucket name, file format, bucket owner (optional), and prefix (optional) where inventory results are published.

Show child fields
inventory_configuration.destination.s3_bucket_destination.account_id

The account ID that owns the destination S3 bucket. If no account ID is provided, the owner is not validated before exporting data.

Although this value is optional, we strongly recommend that you set it to help prevent problems if the destination bucket ownership changes.

inventory_configuration.destination.s3_bucket_destination.bucket

The Amazon Resource Name (ARN) of the bucket where inventory results will be published.

inventory_configuration.destination.s3_bucket_destination.encryption

Contains the type of server-side encryption used to encrypt the inventory results.

Show child fields
inventory_configuration.destination.s3_bucket_destination.encryption.ssekms

Specifies the use of SSE-KMS to encrypt delivered inventory reports.

Show child fields
inventory_configuration.destination.s3_bucket_destination.encryption.ssekms.key_id

Specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key to use for encrypting inventory reports.

inventory_configuration.destination.s3_bucket_destination.encryption.sses3

Specifies the use of SSE-S3 to encrypt delivered inventory reports.

inventory_configuration.destination.s3_bucket_destination.format

Specifies the output format of the inventory results.

inventory_configuration.destination.s3_bucket_destination.prefix

The prefix that is prepended to all inventory results.

inventory_configuration.filter

Specifies an inventory filter. The inventory only includes objects that meet the filter's criteria.

Show child fields
inventory_configuration.filter.prefix

The prefix that an object must have to be included in the inventory results.

inventory_configuration.id

The ID used to identify the inventory configuration.

inventory_configuration.included_object_versions

Object versions to include in the inventory list. If set to All, the list includes all the object versions, which adds the version-related fields VersionId, IsLatest, and DeleteMarker to the list. If set to Current, the list does not contain these version-related fields.

inventory_configuration.is_enabled

Specifies whether the inventory is enabled or disabled. If set to True, an inventory list is generated. If set to False, no inventory list is generated.

inventory_configuration.optional_fields[]
inventory_configuration.schedule

Specifies the schedule for generating inventory results.

Show child fields
inventory_configuration.schedule.frequency

Specifies how frequently inventory results are produced.