Skip to content

aws.dynamodb.describe_table

Example SQL Queries

SELECT * FROM
aws.dynamodb.describe_table
WHERE
"table_name" = 'VALUE';

Description

Returns information about the table, including the current status of the table, when it was created, the primary key schema, and any indexes on the table.

For global tables, this operation only applies to global tables using Version 2019.11.21 (Current version).

If you issue a DescribeTable request immediately after a CreateTable request, DynamoDB might return a ResourceNotFoundException. This is because DescribeTable uses an eventually consistent query, and the metadata for your table might not be available at that moment. Wait for a few seconds, and then try the DescribeTable request again.

Table Definition

Column NameColumn Data Type
table_name Required Input Column

The name of the table to describe. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.

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.

_aws_region Input Column

The AWS region to use.

VARCHAR
table

The properties of the table.

STRUCT(
"attribute_definitions" STRUCT(
"attribute_name" VARCHAR,
"attribute_type" VARCHAR
)[],
"table_name" VARCHAR,
"key_schema" STRUCT(
"attribute_name" VARCHAR,
"key_type" VARCHAR
)[],
"table_status" VARCHAR,
"creation_date_time" TIMESTAMP_S,
"provisioned_throughput" STRUCT(
"last_increase_date_time" TIMESTAMP_S,
"last_decrease_date_time" TIMESTAMP_S,
"number_of_decreases_today" BIGINT,
"read_capacity_units" BIGINT,
"write_capacity_units" BIGINT
),
"table_size_bytes" BIGINT,
"item_count" BIGINT,
"table_arn" VARCHAR,
"table_id" VARCHAR,
"billing_mode_summary" STRUCT(
"billing_mode" VARCHAR,
"last_update_to_pay_per_request_date_time" TIMESTAMP_S
),
"local_secondary_indexes" STRUCT(
"index_name" VARCHAR,
"key_schema" STRUCT(
"attribute_name" VARCHAR,
"key_type" VARCHAR
)[],
"projection" STRUCT(
"projection_type" VARCHAR,
"non_key_attributes" VARCHAR[]
),
"index_size_bytes" BIGINT,
"item_count" BIGINT,
"index_arn" VARCHAR
)[],
"global_secondary_indexes" STRUCT(
"index_name" VARCHAR,
"key_schema" STRUCT(
"attribute_name" VARCHAR,
"key_type" VARCHAR
)[],
"projection" STRUCT(
"projection_type" VARCHAR,
"non_key_attributes" VARCHAR[]
),
"index_status" VARCHAR,
"backfilling" BOOLEAN,
"provisioned_throughput" STRUCT(
"last_increase_date_time" TIMESTAMP_S,
"last_decrease_date_time" TIMESTAMP_S,
"number_of_decreases_today" BIGINT,
"read_capacity_units" BIGINT,
"write_capacity_units" BIGINT
),
"index_size_bytes" BIGINT,
"item_count" BIGINT,
"index_arn" VARCHAR,
"on_demand_throughput" STRUCT(
"max_read_request_units" BIGINT,
"max_write_request_units" BIGINT
)
)[],
"stream_specification" STRUCT(
"stream_enabled" BOOLEAN,
"stream_view_type" VARCHAR
),
"latest_stream_label" VARCHAR,
"latest_stream_arn" VARCHAR,
"global_table_version" VARCHAR,
"replicas" STRUCT(
"region_name" VARCHAR,
"replica_status" VARCHAR,
"replica_status_description" VARCHAR,
"replica_status_percent_progress" VARCHAR,
"kms_master_key_id" VARCHAR,
"provisioned_throughput_override" STRUCT(
"read_capacity_units" BIGINT
),
"on_demand_throughput_override" STRUCT(
"max_read_request_units" BIGINT
),
"global_secondary_indexes" STRUCT(
"index_name" VARCHAR,
"provisioned_throughput_override" STRUCT(
"read_capacity_units" BIGINT
),
"on_demand_throughput_override" STRUCT(
"max_read_request_units" BIGINT
)
)[],
"replica_inaccessible_date_time" TIMESTAMP_S,
"replica_table_class_summary" STRUCT(
"table_class" VARCHAR,
"last_update_date_time" TIMESTAMP_S
)
)[],
"restore_summary" STRUCT(
"source_backup_arn" VARCHAR,
"source_table_arn" VARCHAR,
"restore_date_time" TIMESTAMP_S,
"restore_in_progress" BOOLEAN
),
"sse_description" STRUCT(
"status" VARCHAR,
"sse_type" VARCHAR,
"kms_master_key_arn" VARCHAR,
"inaccessible_encryption_date_time" TIMESTAMP_S
),
"archival_summary" STRUCT(
"archival_date_time" TIMESTAMP_S,
"archival_reason" VARCHAR,
"archival_backup_arn" VARCHAR
),
"table_class_summary" STRUCT(
"table_class" VARCHAR,
"last_update_date_time" TIMESTAMP_S
),
"deletion_protection_enabled" BOOLEAN,
"on_demand_throughput" STRUCT(
"max_read_request_units" BIGINT,
"max_write_request_units" BIGINT
)
)
Show child fields
table.archival_summary

Contains information about the table archive.

Show child fields
table.archival_summary.archival_backup_arn

The Amazon Resource Name (ARN) of the backup the table was archived to, when applicable in the archival reason. If you wish to restore this backup to the same table name, you will need to delete the original table.

table.archival_summary.archival_date_time

The date and time when table archival was initiated by DynamoDB, in UNIX epoch time format.

table.archival_summary.archival_reason

The reason DynamoDB archived the table. Currently, the only possible value is:

  • INACCESSIBLE_ENCRYPTION_CREDENTIALS - The table was archived due to the table's KMS key being inaccessible for more than seven days. An On-Demand backup was created at the archival time.

table.attribute_definitions[]
Show child fields
table.attribute_definitions[].attribute_name

A name for the attribute.

table.attribute_definitions[].attribute_type

The data type for the attribute, where:

  • S - the attribute is of type String

  • N - the attribute is of type Number

  • B - the attribute is of type Binary

table.billing_mode_summary

Contains the details for the read/write capacity mode.

Show child fields
table.billing_mode_summary.billing_mode

Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.

  • PROVISIONED - Sets the read/write capacity mode to PROVISIONED. We recommend using PROVISIONED for predictable workloads.

  • PAY_PER_REQUEST - Sets the read/write capacity mode to PAY_PER_REQUEST. We recommend using PAY_PER_REQUEST for unpredictable workloads.

table.billing_mode_summary.last_update_to_pay_per_request_date_time

Represents the time when PAY_PER_REQUEST was last set as the read/write capacity mode.

table.creation_date_time

The date and time when the table was created, in UNIX epoch time format.

table.deletion_protection_enabled

Indicates whether deletion protection is enabled (true) or disabled (false) on the table.

table.global_secondary_indexes[]
Show child fields
table.global_secondary_indexes[].backfilling

Indicates whether the index is currently backfilling. Backfilling is the process of reading items from the table and determining whether they can be added to the index. (Not all items will qualify: For example, a partition key cannot have any duplicate values.) If an item can be added to the index, DynamoDB will do so. After all items have been processed, the backfilling operation is complete and Backfilling is false.

You can delete an index that is being created during the Backfilling phase when IndexStatus is set to CREATING and Backfilling is true. You can't delete the index that is being created when IndexStatus is set to CREATING and Backfilling is false.

For indexes that were created during a CreateTable operation, the Backfilling attribute does not appear in the DescribeTable output.

table.global_secondary_indexes[].index_arn

The Amazon Resource Name (ARN) that uniquely identifies the index.

table.global_secondary_indexes[].index_name

The name of the global secondary index.

table.global_secondary_indexes[].index_size_bytes

The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

table.global_secondary_indexes[].index_status

The current state of the global secondary index:

  • CREATING - The index is being created.

  • UPDATING - The index is being updated.

  • DELETING - The index is being deleted.

  • ACTIVE - The index is ready for use.

table.global_secondary_indexes[].item_count

The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

table.global_secondary_indexes[].key_schema[]
Show child fields
table.global_secondary_indexes[].key_schema[].attribute_name

The name of a key attribute.

table.global_secondary_indexes[].key_schema[].key_type

The role that this key attribute will assume:

  • HASH - partition key

  • RANGE - sort key

The partition key of an item is also known as its hash attribute. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

The sort key of an item is also known as its range attribute. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

table.global_secondary_indexes[].on_demand_throughput

The maximum number of read and write units for the specified global secondary index. If you use this parameter, you must specify MaxReadRequestUnits, MaxWriteRequestUnits, or both.

Show child fields
table.global_secondary_indexes[].on_demand_throughput.max_read_request_units

Maximum number of read request units for the specified table.

To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

table.global_secondary_indexes[].on_demand_throughput.max_write_request_units

Maximum number of write request units for the specified table.

To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

table.global_secondary_indexes[].projection

Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.

Show child fields
table.global_secondary_indexes[].projection.non_key_attributes[]
table.global_secondary_indexes[].projection.projection_type

The set of attributes that are projected into the index:

  • KEYS_ONLY - Only the index and primary keys are projected into the index.

  • INCLUDE - In addition to the attributes described in KEYS_ONLY, the secondary index will include other non-key attributes that you specify.

  • ALL - All of the table attributes are projected into the index.

When using the DynamoDB console, ALL is selected by default.

table.global_secondary_indexes[].provisioned_throughput

Represents the provisioned throughput settings for the specified global secondary index.

For current minimum and maximum provisioned throughput values, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide.

Show child fields
table.global_secondary_indexes[].provisioned_throughput.last_decrease_date_time

The date and time of the last provisioned throughput decrease for this table.

table.global_secondary_indexes[].provisioned_throughput.last_increase_date_time

The date and time of the last provisioned throughput increase for this table.

table.global_secondary_indexes[].provisioned_throughput.number_of_decreases_today

The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide.

table.global_secondary_indexes[].provisioned_throughput.read_capacity_units

The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException. Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 ReadCapacityUnits per second provides 100 eventually consistent ReadCapacityUnits per second.

table.global_secondary_indexes[].provisioned_throughput.write_capacity_units

The maximum number of writes consumed per second before DynamoDB returns a ThrottlingException.

table.global_table_version

Represents the version of global tables in use, if the table is replicated across Amazon Web Services Regions.

table.item_count

The number of items in the specified table. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

table.key_schema[]
Show child fields
table.key_schema[].attribute_name

The name of a key attribute.

table.key_schema[].key_type

The role that this key attribute will assume:

  • HASH - partition key

  • RANGE - sort key

The partition key of an item is also known as its hash attribute. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

The sort key of an item is also known as its range attribute. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

table.latest_stream_arn

The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table.

table.latest_stream_label

A timestamp, in ISO 8601 format, for this stream.

Note that LatestStreamLabel is not a unique identifier for the stream, because it is possible that a stream from another table might have the same timestamp. However, the combination of the following three elements is guaranteed to be unique:

  • Amazon Web Services customer ID

  • Table name

  • StreamLabel

table.local_secondary_indexes[]
Show child fields
table.local_secondary_indexes[].index_arn

The Amazon Resource Name (ARN) that uniquely identifies the index.

table.local_secondary_indexes[].index_name

Represents the name of the local secondary index.

table.local_secondary_indexes[].index_size_bytes

The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

table.local_secondary_indexes[].item_count

The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

table.local_secondary_indexes[].key_schema[]
Show child fields
table.local_secondary_indexes[].key_schema[].attribute_name

The name of a key attribute.

table.local_secondary_indexes[].key_schema[].key_type

The role that this key attribute will assume:

  • HASH - partition key

  • RANGE - sort key

The partition key of an item is also known as its hash attribute. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

The sort key of an item is also known as its range attribute. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

table.local_secondary_indexes[].projection

Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.

Show child fields
table.local_secondary_indexes[].projection.non_key_attributes[]
table.local_secondary_indexes[].projection.projection_type

The set of attributes that are projected into the index:

  • KEYS_ONLY - Only the index and primary keys are projected into the index.

  • INCLUDE - In addition to the attributes described in KEYS_ONLY, the secondary index will include other non-key attributes that you specify.

  • ALL - All of the table attributes are projected into the index.

When using the DynamoDB console, ALL is selected by default.

table.on_demand_throughput

The maximum number of read and write units for the specified on-demand table. If you use this parameter, you must specify MaxReadRequestUnits, MaxWriteRequestUnits, or both.

Show child fields
table.on_demand_throughput.max_read_request_units

Maximum number of read request units for the specified table.

To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

table.on_demand_throughput.max_write_request_units

Maximum number of write request units for the specified table.

To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

table.provisioned_throughput

The provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases.

Show child fields
table.provisioned_throughput.last_decrease_date_time

The date and time of the last provisioned throughput decrease for this table.

table.provisioned_throughput.last_increase_date_time

The date and time of the last provisioned throughput increase for this table.

table.provisioned_throughput.number_of_decreases_today

The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide.

table.provisioned_throughput.read_capacity_units

The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException. Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 ReadCapacityUnits per second provides 100 eventually consistent ReadCapacityUnits per second.

table.provisioned_throughput.write_capacity_units

The maximum number of writes consumed per second before DynamoDB returns a ThrottlingException.

table.replicas[]
Show child fields
table.replicas[].global_secondary_indexes[]
Show child fields
table.replicas[].global_secondary_indexes[].index_name

The name of the global secondary index.

table.replicas[].global_secondary_indexes[].on_demand_throughput_override

Overrides the maximum on-demand throughput for the specified global secondary index in the specified replica table.

Show child fields
table.replicas[].global_secondary_indexes[].on_demand_throughput_override.max_read_request_units

Maximum number of read request units for the specified replica table.

table.replicas[].global_secondary_indexes[].provisioned_throughput_override

If not described, uses the source table GSI's read capacity settings.

Show child fields
table.replicas[].global_secondary_indexes[].provisioned_throughput_override.read_capacity_units

Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.

table.replicas[].kms_master_key_id

The KMS key of the replica that will be used for KMS encryption.

table.replicas[].on_demand_throughput_override

Overrides the maximum on-demand throughput settings for the specified replica table.

Show child fields
table.replicas[].on_demand_throughput_override.max_read_request_units

Maximum number of read request units for the specified replica table.

table.replicas[].provisioned_throughput_override

Replica-specific provisioned throughput. If not described, uses the source table's provisioned throughput settings.

Show child fields
table.replicas[].provisioned_throughput_override.read_capacity_units

Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.

table.replicas[].region_name

The name of the Region.

table.replicas[].replica_inaccessible_date_time

The time at which the replica was first detected as inaccessible. To determine cause of inaccessibility check the ReplicaStatus property.

table.replicas[].replica_status

The current state of the replica:

  • CREATING - The replica is being created.

  • UPDATING - The replica is being updated.

  • DELETING - The replica is being deleted.

  • ACTIVE - The replica is ready for use.

  • REGION_DISABLED - The replica is inaccessible because the Amazon Web Services Region has been disabled.

    If the Amazon Web Services Region remains inaccessible for more than 20 hours, DynamoDB will remove this replica from the replication group. The replica will not be deleted and replication will stop from and to this region.

  • INACCESSIBLE_ENCRYPTION_CREDENTIALS - The KMS key used to encrypt the table is inaccessible.

    If the KMS key remains inaccessible for more than 20 hours, DynamoDB will remove this replica from the replication group. The replica will not be deleted and replication will stop from and to this region.

table.replicas[].replica_status_description

Detailed information about the replica status.

table.replicas[].replica_status_percent_progress

Specifies the progress of a Create, Update, or Delete action on the replica as a percentage.

table.replicas[].replica_table_class_summary

Contains details of the table class.

Show child fields
table.replicas[].replica_table_class_summary.last_update_date_time

The date and time at which the table class was last updated.

table.replicas[].replica_table_class_summary.table_class

The table class of the specified table. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS.

table.restore_summary

Contains details for the restore.

Show child fields
table.restore_summary.restore_date_time

Point in time or source backup time.

table.restore_summary.restore_in_progress

Indicates if a restore is in progress or not.

table.restore_summary.source_backup_arn

The Amazon Resource Name (ARN) of the backup from which the table was restored.

table.restore_summary.source_table_arn

The ARN of the source table of the backup that is being restored.

table.sse_description

The description of the server-side encryption status on the specified table.

Show child fields
table.sse_description.inaccessible_encryption_date_time

Indicates the time, in UNIX epoch date format, when DynamoDB detected that the table's KMS key was inaccessible. This attribute will automatically be cleared when DynamoDB detects that the table's KMS key is accessible again. DynamoDB will initiate the table archival process when table's KMS key remains inaccessible for more than seven days from this date.

table.sse_description.kms_master_key_arn

The KMS key ARN used for the KMS encryption.

table.sse_description.sse_type

Server-side encryption type. The only supported value is:

  • KMS - Server-side encryption that uses Key Management Service. The key is stored in your account and is managed by KMS (KMS charges apply).

table.sse_description.status

Represents the current state of server-side encryption. The only supported values are:

  • ENABLED - Server-side encryption is enabled.

  • UPDATING - Server-side encryption is being updated.

table.stream_specification

The current DynamoDB Streams configuration for the table.

Show child fields
table.stream_specification.stream_enabled

Indicates whether DynamoDB Streams is enabled (true) or disabled (false) on the table.

table.stream_specification.stream_view_type

When an item in the table is modified, StreamViewType determines what information is written to the stream for this table. Valid values for StreamViewType are:

  • KEYS_ONLY - Only the key attributes of the modified item are written to the stream.

  • NEW_IMAGE - The entire item, as it appears after it was modified, is written to the stream.

  • OLD_IMAGE - The entire item, as it appeared before it was modified, is written to the stream.

  • NEW_AND_OLD_IMAGES - Both the new and the old item images of the item are written to the stream.

table.table_arn

The Amazon Resource Name (ARN) that uniquely identifies the table.

table.table_class_summary

Contains details of the table class.

Show child fields
table.table_class_summary.last_update_date_time

The date and time at which the table class was last updated.

table.table_class_summary.table_class

The table class of the specified table. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS.

table.table_id

Unique identifier for the table for which the backup was created.

table.table_name

The name of the table.

table.table_size_bytes

The total size of the specified table, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

table.table_status

The current state of the table:

  • CREATING - The table is being created.

  • UPDATING - The table/index configuration is being updated. The table/index remains available for data operations when UPDATING.

  • DELETING - The table is being deleted.

  • ACTIVE - The table is ready for use.

  • INACCESSIBLE_ENCRYPTION_CREDENTIALS - The KMS key used to encrypt the table in inaccessible. Table operations may fail due to failure to use the KMS key. DynamoDB will initiate the table archival process when a table's KMS key remains inaccessible for more than seven days.

  • ARCHIVING - The table is being archived. Operations are not allowed until archival is complete.

  • ARCHIVED - The table has been archived. See the ArchivalReason for more information.