Skip to content

aws.dynamodbstreams.describe_stream

Example SQL Queries

SELECT * FROM
aws.dynamodbstreams.describe_stream
WHERE
"stream_arn" = 'VALUE';

Description

Returns information about a stream, including the current status of the stream, its Amazon Resource Name (ARN), the composition of its shards, and its corresponding DynamoDB table.

You can call DescribeStream at a maximum rate of 10 times per second.

Each shard in the stream has a SequenceNumberRange associated with it. If the SequenceNumberRange has a StartingSequenceNumber but no EndingSequenceNumber, then the shard is still open (able to receive more stream records). If both StartingSequenceNumber and EndingSequenceNumber are present, then that shard is closed and can no longer receive more data.

Table Definition

Column NameColumn Data Type
stream_arn Required Input Column

The Amazon Resource Name (ARN) for the stream.

VARCHAR
exclusive_start_shard_id Input Column

The shard ID of the first item that this operation will evaluate. Use the value that was returned for LastEvaluatedShardId in the previous operation.

VARCHAR
limit Input Column

The maximum number of shard objects to return. The upper limit is 100.

BIGINT
_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.

stream_description

A complete description of the stream, including its creation date and time, the DynamoDB table associated with the stream, the shard IDs within the stream, and the beginning and ending sequence numbers of stream records within the shards.

STRUCT(
"stream_arn" VARCHAR,
"stream_label" VARCHAR,
"stream_status" VARCHAR,
"stream_view_type" VARCHAR,
"creation_request_date_time" TIMESTAMP_S,
"table_name" VARCHAR,
"key_schema" STRUCT(
"attribute_name" VARCHAR,
"key_type" VARCHAR
)[],
"shards" STRUCT(
"shard_id" VARCHAR,
"sequence_number_range" STRUCT(
"starting_sequence_number" VARCHAR,
"ending_sequence_number" VARCHAR
),
"parent_shard_id" VARCHAR
)[],
"last_evaluated_shard_id" VARCHAR
)
Show child fields
stream_description.creation_request_date_time

The date and time when the request to create this stream was issued.

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

The name of a key attribute.

stream_description.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.

stream_description.last_evaluated_shard_id

The shard ID of the item where the operation stopped, inclusive of the previous result set. Use this value to start a new operation, excluding this value in the new request.

If LastEvaluatedShardId is empty, then the "last page" of results has been processed and there is currently no more data to be retrieved.

If LastEvaluatedShardId is not empty, it does not necessarily mean that there is more data in the result set. The only way to know when you have reached the end of the result set is when LastEvaluatedShardId is empty.

stream_description.shards[]
Show child fields
stream_description.shards[].parent_shard_id

The shard ID of the current shard's parent.

stream_description.shards[].sequence_number_range

The range of possible sequence numbers for the shard.

Show child fields
stream_description.shards[].sequence_number_range.ending_sequence_number

The last sequence number for the stream records contained within a shard. String contains numeric characters only.

stream_description.shards[].sequence_number_range.starting_sequence_number

The first sequence number for the stream records contained within a shard. String contains numeric characters only.

stream_description.shards[].shard_id

The system-generated identifier for this shard.

stream_description.stream_arn

The Amazon Resource Name (ARN) for the stream.

stream_description.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:

  • the Amazon Web Services customer ID.

  • the table name

  • the StreamLabel

stream_description.stream_status

Indicates the current status of the stream:

  • ENABLING - Streams is currently being enabled on the DynamoDB table.

  • ENABLED - the stream is enabled.

  • DISABLING - Streams is currently being disabled on the DynamoDB table.

  • DISABLED - the stream is disabled.

stream_description.stream_view_type

Indicates the format of the records within this stream:

  • KEYS_ONLY - only the key attributes of items that were modified in the DynamoDB table.

  • NEW_IMAGE - entire items from the table, as they appeared after they were modified.

  • OLD_IMAGE - entire items from the table, as they appeared before they were modified.

  • NEW_AND_OLD_IMAGES - both the new and the old images of the items from the table.

stream_description.table_name

The DynamoDB table with which the stream is associated.