Skip to content

aws.s3control.list_access_grants

Example SQL Queries

SELECT * FROM
aws.s3control.list_access_grants
WHERE
"account_id" = 'VALUE';

Description

Returns the list of access grants in your S3 Access Grants instance.

Permissions

You must have the s3:ListAccessGrants permission to use this operation.

Table Definition

Column NameColumn Data Type
account_id Required Input Column

The ID of the Amazon Web Services account that is making this request.

VARCHAR
application_arn Input Column

The Amazon Resource Name (ARN) of an Amazon Web Services IAM Identity Center application associated with your Identity Center instance. If the grant includes an application ARN, the grantee can only access the S3 data through this application.

VARCHAR
grant_scope Input Column

The S3 path of the data to which you are granting access. It is the result of appending the Subprefix to the location scope.

VARCHAR
grantee_identifier Input Column

The unique identifer of the Grantee. If the grantee type is IAM, the identifier is the IAM Amazon Resource Name (ARN) of the user or role. If the grantee type is a directory user or group, the identifier is 128-bit universally unique identifier (UUID) in the format a1b2c3d4-5678-90ab-cdef-EXAMPLE11111. You can obtain this UUID from your Amazon Web Services IAM Identity Center instance.

VARCHAR
grantee_type Input Column

The type of the grantee to which access has been granted. It can be one of the following values:

  • IAM - An IAM user or role.

  • DIRECTORY_USER - Your corporate directory user. You can use this option if you have added your corporate identity directory to IAM Identity Center and associated the IAM Identity Center instance with your S3 Access Grants instance.

  • DIRECTORY_GROUP - Your corporate directory group. You can use this option if you have added your corporate identity directory to IAM Identity Center and associated the IAM Identity Center instance with your S3 Access Grants instance.

VARCHAR
max_results Input Column

The maximum number of access grants that you would like returned in the List Access Grants response. If the results include the pagination token NextToken, make another call using the NextToken to determine if there are more results.

BIGINT
next_token Input Column

A pagination token to request the next page of results. Pass this value into a subsequent List Access Grants request in order to retrieve the next page of results.

VARCHAR
permission Input Column

The type of permission granted to your S3 data, which can be set to one of the following values:

  • READ – Grant read-only access to the S3 data.

  • WRITE – Grant write-only access to the S3 data.

  • READWRITE – Grant both read and write access to the S3 data.

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.

access_grants_list

A container for a list of grants in an S3 Access Grants instance.

STRUCT(
"created_at" TIMESTAMP_S,
"access_grant_id" VARCHAR,
"access_grant_arn" VARCHAR,
"grantee" STRUCT(
"grantee_type" VARCHAR,
"grantee_identifier" VARCHAR
),
"permission" VARCHAR,
"access_grants_location_id" VARCHAR,
"access_grants_location_configuration" STRUCT(
"s3_sub_prefix" VARCHAR
),
"grant_scope" VARCHAR,
"application_arn" VARCHAR
)[]
Show child fields
access_grants_list[]
Show child fields
access_grants_list[].access_grant_arn

The Amazon Resource Name (ARN) of the access grant.

access_grants_list[].access_grant_id

The ID of the access grant. S3 Access Grants auto-generates this ID when you create the access grant.

access_grants_list[].access_grants_location_configuration

The configuration options of the grant location. The grant location is the S3 path to the data to which you are granting access.

Show child fields
access_grants_list[].access_grants_location_configuration.s3_sub_prefix

The S3SubPrefix is appended to the location scope creating the grant scope. Use this field to narrow the scope of the grant to a subset of the location scope. This field is required if the location scope is the default location s3:// because you cannot create a grant for all of your S3 data in the Region and must narrow the scope. For example, if the location scope is the default location s3://, the S3SubPrefx can be a <bucket-name>/*, so the full grant scope path would be s3://<bucket-name>/*. Or the S3SubPrefx can be <bucket-name>/<prefix-name>*, so the full grant scope path would be or s3://<bucket-name>/<prefix-name>*.

If the S3SubPrefix includes a prefix, append the wildcard character * after the prefix to indicate that you want to include all object key names in the bucket that start with that prefix.

access_grants_list[].access_grants_location_id

The ID of the registered location to which you are granting access. S3 Access Grants assigns this ID when you register the location. S3 Access Grants assigns the ID default to the default location s3:// and assigns an auto-generated ID to other locations that you register.

access_grants_list[].application_arn

The Amazon Resource Name (ARN) of an Amazon Web Services IAM Identity Center application associated with your Identity Center instance. If the grant includes an application ARN, the grantee can only access the S3 data through this application.

access_grants_list[].created_at

The date and time when you created the S3 Access Grants instance.

access_grants_list[].grant_scope

The S3 path of the data to which you are granting access. It is the result of appending the Subprefix to the location scope.

access_grants_list[].grantee

The user, group, or role to which you are granting access. You can grant access to an IAM user or role. If you have added your corporate directory to Amazon Web Services IAM Identity Center and associated your Identity Center instance with your S3 Access Grants instance, the grantee can also be a corporate directory user or group.

Show child fields
access_grants_list[].grantee.grantee_identifier

The unique identifier of the Grantee. If the grantee type is IAM, the identifier is the IAM Amazon Resource Name (ARN) of the user or role. If the grantee type is a directory user or group, the identifier is 128-bit universally unique identifier (UUID) in the format a1b2c3d4-5678-90ab-cdef-EXAMPLE11111. You can obtain this UUID from your Amazon Web Services IAM Identity Center instance.

access_grants_list[].grantee.grantee_type

The type of the grantee to which access has been granted. It can be one of the following values:

  • IAM - An IAM user or role.

  • DIRECTORY_USER - Your corporate directory user. You can use this option if you have added your corporate identity directory to IAM Identity Center and associated the IAM Identity Center instance with your S3 Access Grants instance.

  • DIRECTORY_GROUP - Your corporate directory group. You can use this option if you have added your corporate identity directory to IAM Identity Center and associated the IAM Identity Center instance with your S3 Access Grants instance.

access_grants_list[].permission

The type of access granted to your S3 data, which can be set to one of the following values:

  • READ – Grant read-only access to the S3 data.

  • WRITE – Grant write-only access to the S3 data.

  • READWRITE – Grant both read and write access to the S3 data.