DataFire integration for Amazon DynamoDB Streams
npm install @datafire/amazonaws_streams_dynamodbClient library for Amazon DynamoDB Streams
bash
npm install --save @datafire/amazonaws_streams_dynamodb
`
`js
let amazonaws_streams_dynamodb = require('@datafire/amazonaws_streams_dynamodb').create({
accessKeyId: "",
secretAccessKey: "",
region: ""
});amazonaws_streams_dynamodb.DescribeStream({
"StreamArn": ""
}).then(data => {
console.log(data);
});
`Description
Amazon DynamoDB
Amazon DynamoDB Streams provides API actions for accessing streams and processing stream records. To learn more about application development with Streams, see Capturing Table Activity with DynamoDB Streams in the Amazon DynamoDB Developer Guide.
Actions
$3
`js
amazonaws_streams_dynamodb.DescribeStream({
"StreamArn": ""
}, context)
`#### Input
* input
object
* ExclusiveStartShardId ShardId
* Limit PositiveIntegerObject
* StreamArn required StreamArn#### Output
* output DescribeStreamOutput
$3
`js
amazonaws_streams_dynamodb.GetRecords({
"ShardIterator": ""
}, context)
`#### Input
* input
object
* Limit PositiveIntegerObject
* ShardIterator required ShardIterator#### Output
* output GetRecordsOutput
$3
`js
amazonaws_streams_dynamodb.GetShardIterator({
"StreamArn": "",
"ShardId": "",
"ShardIteratorType": ""
}, context)
`#### Input
* input
object
* SequenceNumber SequenceNumber
* ShardId required ShardId
* ShardIteratorType required ShardIteratorType
* StreamArn required StreamArn#### Output
* output GetShardIteratorOutput
$3
`js
amazonaws_streams_dynamodb.ListStreams({}, context)
`#### Input
* input
object
* ExclusiveStartStreamArn StreamArn
* Limit PositiveIntegerObject
* TableName TableName#### Output
* output ListStreamsOutput
Definitions
$3
* AttributeMap array
* items object
* key AttributeName
* value AttributeValue$3
* AttributeName string$3
* AttributeValue object: Represents the data for an attribute. You can set one, and only one, of the elements.
Each attribute in an item is a name-value pair. An attribute can be single-valued or multi-valued set. For example, a book item can have title and authors attributes. Each book has one title but can have many authors. The multi-valued attribute is a set; duplicate values are not allowed.
* B BinaryAttributeValue
* BOOL BooleanAttributeValue
* BS BinarySetAttributeValue
* L ListAttributeValue
* M MapAttributeValue
* N NumberAttributeValue
* NS NumberSetAttributeValue
* NULL NullAttributeValue
* S StringAttributeValue
* SS StringSetAttributeValue$3
* BinaryAttributeValue string$3
* BinarySetAttributeValue array
* items BinaryAttributeValue$3
* BooleanAttributeValue boolean$3
* Date string$3
* DescribeStreamInput object: Represents the input of a DescribeStream operation.
* ExclusiveStartShardId ShardId
* Limit PositiveIntegerObject
* StreamArn required StreamArn$3
* DescribeStreamOutput object: Represents the output of a DescribeStream operation.
* StreamDescription StreamDescription$3
* ErrorMessage string$3
* ExpiredIteratorException object: The shard iterator has expired and can no longer be used to retrieve stream records. A shard iterator expires 15 minutes after it is retrieved using the GetShardIterator action.
* message ErrorMessage$3
* GetRecordsInput object: Represents the input of a GetRecords operation.
* Limit PositiveIntegerObject
* ShardIterator required ShardIterator$3
* GetRecordsOutput object: Represents the output of a GetRecords operation.
* NextShardIterator ShardIterator
* Records RecordList$3
* GetShardIteratorInput object: Represents the input of a GetShardIterator operation.
* SequenceNumber SequenceNumber
* ShardId required ShardId
* ShardIteratorType required ShardIteratorType
* StreamArn required StreamArn$3
* GetShardIteratorOutput object: Represents the output of a GetShardIterator operation.
* ShardIterator ShardIterator$3
* Identity object: Contains details about the type of identity that made the request.
* PrincipalId String
* Type String$3
* InternalServerError object: An error occurred on the server side.
* message ErrorMessage$3
* KeySchema array
* items KeySchemaElement$3
* KeySchemaAttributeName string$3
* KeySchemaElement object: Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.
A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key (partition key) would be represented by one KeySchemaElement. A composite primary key (partition key and sort key) would require one KeySchemaElement for the partition key, and another KeySchemaElement for the 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.
* AttributeName required KeySchemaAttributeName
* KeyType required KeyType$3
* KeyType string (values: HASH, RANGE)$3
* LimitExceededException object: Your request rate is too high. The AWS SDKs for DynamoDB automatically retry requests that receive this exception. Your request is eventually successful, unless your retry queue is too large to finish. Reduce the frequency of requests and use exponential backoff. For more information, go to Error Retries and Exponential Backoff in the Amazon DynamoDB Developer Guide.
* message ErrorMessage$3
* ListAttributeValue array
* items AttributeValue$3
* ListStreamsInput object: Represents the input of a ListStreams operation.
* ExclusiveStartStreamArn StreamArn
* Limit PositiveIntegerObject
* TableName TableName$3
* ListStreamsOutput object: Represents the output of a ListStreams operation.
* LastEvaluatedStreamArn StreamArn
* Streams StreamList$3
* MapAttributeValue array
* items object
* key AttributeName
* value AttributeValue$3
* NullAttributeValue boolean$3
* NumberAttributeValue string$3
* NumberSetAttributeValue array
* items NumberAttributeValue$3
* OperationType string (values: INSERT, MODIFY, REMOVE)$3
* PositiveIntegerObject integer$3
* PositiveLongObject integer$3
* Record object: A description of a unique event within a stream.
* awsRegion String
* dynamodb StreamRecord
* eventID String
* eventName OperationType
* eventSource String
* eventVersion String
* userIdentity Identity$3
* RecordList array
* items Record$3
* ResourceNotFoundException object: The operation tried to access a nonexistent stream.
* message ErrorMessage$3
* SequenceNumber string$3
* SequenceNumberRange object: The beginning and ending sequence numbers for the stream records contained within a shard.
* EndingSequenceNumber SequenceNumber
* StartingSequenceNumber SequenceNumber$3
* Shard object: A uniquely identified group of stream records within a stream.
* ParentShardId ShardId
* SequenceNumberRange SequenceNumberRange
* ShardId ShardId$3
* ShardDescriptionList array
* items Shard$3
* ShardId string$3
* ShardIterator string$3
* ShardIteratorType string (values: TRIM_HORIZON, LATEST, AT_SEQUENCE_NUMBER, AFTER_SEQUENCE_NUMBER)$3
* Stream object: Represents all of the data describing a particular stream.
* StreamArn StreamArn
* StreamLabel String
* TableName TableName$3
* StreamArn string$3
* StreamDescription object: Represents all of the data describing a particular stream.
* CreationRequestDateTime Date
* KeySchema KeySchema
* LastEvaluatedShardId ShardId
* Shards ShardDescriptionList
* StreamArn StreamArn
* StreamLabel String
* StreamStatus StreamStatus
* StreamViewType StreamViewType
* TableName TableName$3
* StreamList array
* items Stream$3
* StreamRecord object: A description of a single data modification that was performed on an item in a DynamoDB table.
* ApproximateCreationDateTime Date
* Keys AttributeMap
* NewImage AttributeMap
* OldImage AttributeMap
* SequenceNumber SequenceNumber
* SizeBytes PositiveLongObject
* StreamViewType StreamViewType$3
* StreamStatus string (values: ENABLING, ENABLED, DISABLING, DISABLED)$3
* StreamViewType string (values: NEW_IMAGE, OLD_IMAGE, NEW_AND_OLD_IMAGES, KEYS_ONLY)$3
* String string$3
* StringAttributeValue string$3
* StringSetAttributeValue array
* items StringAttributeValue$3
* TableName string$3
* TrimmedDataAccessException object`: The operation attempted to read past the oldest stream record in a shard.
In DynamoDB Streams, there is a 24 hour limit on data retention. Stream records whose age exceeds this limit are subject to removal (trimming) from the stream. You might receive a TrimmedDataAccessException if:
You request a shard iterator with a sequence number older than the trim point (24 hours).
You obtain a shard iterator, but before you use the iterator in a GetRecords request, a stream record in the shard exceeds the 24 hour period and is trimmed. This causes the iterator to access a record that no longer exists.