New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@aws-sdk/client-dynamodb-streams

Package Overview
Dependencies
Maintainers
0
Versions
438
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/client-dynamodb-streams

AWS SDK for JavaScript Dynamodb Streams Client for Node.js, Browser and React Native

  • 3.721.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created

What is @aws-sdk/client-dynamodb-streams?

@aws-sdk/client-dynamodb-streams is a part of the AWS SDK for JavaScript, which allows you to interact with Amazon DynamoDB Streams. DynamoDB Streams capture a time-ordered sequence of item-level modifications in a DynamoDB table and store this information for up to 24 hours. This package enables you to work with these streams, allowing you to capture and process changes to your DynamoDB tables.

What are @aws-sdk/client-dynamodb-streams's main functionalities?

List Streams

This feature allows you to list all the streams associated with a DynamoDB table. The code sample demonstrates how to create a DynamoDBStreamsClient, create a ListStreamsCommand, and send the command to list the streams.

{"language":"javascript","content":"const { DynamoDBStreamsClient, ListStreamsCommand } = require('@aws-sdk/client-dynamodb-streams');\n\nconst client = new DynamoDBStreamsClient({ region: 'us-west-2' });\n\nconst listStreams = async () => {\n  const command = new ListStreamsCommand({ TableName: 'YourTableName' });\n  const response = await client.send(command);\n  console.log(response.Streams);\n};\n\nlistStreams();"}

Describe Stream

This feature allows you to describe a specific stream. The code sample demonstrates how to create a DescribeStreamCommand with a given StreamArn and send the command to get the stream description.

{"language":"javascript","content":"const { DynamoDBStreamsClient, DescribeStreamCommand } = require('@aws-sdk/client-dynamodb-streams');\n\nconst client = new DynamoDBStreamsClient({ region: 'us-west-2' });\n\nconst describeStream = async (streamArn) => {\n  const command = new DescribeStreamCommand({ StreamArn: streamArn });\n  const response = await client.send(command);\n  console.log(response.StreamDescription);\n};\n\ndescribeStream('your-stream-arn');"}

Get Shard Iterator

This feature allows you to get a shard iterator, which is used to read stream records from a shard. The code sample demonstrates how to create a GetShardIteratorCommand with the necessary parameters and send the command to get the shard iterator.

{"language":"javascript","content":"const { DynamoDBStreamsClient, GetShardIteratorCommand } = require('@aws-sdk/client-dynamodb-streams');\n\nconst client = new DynamoDBStreamsClient({ region: 'us-west-2' });\n\nconst getShardIterator = async (streamArn, shardId) => {\n  const command = new GetShardIteratorCommand({\n    StreamArn: streamArn,\n    ShardId: shardId,\n    ShardIteratorType: 'TRIM_HORIZON'\n  });\n  const response = await client.send(command);\n  console.log(response.ShardIterator);\n};\n\ngetShardIterator('your-stream-arn', 'your-shard-id');"}

Get Records

This feature allows you to get records from a shard using a shard iterator. The code sample demonstrates how to create a GetRecordsCommand with a given ShardIterator and send the command to retrieve the records.

{"language":"javascript","content":"const { DynamoDBStreamsClient, GetRecordsCommand } = require('@aws-sdk/client-dynamodb-streams');\n\nconst client = new DynamoDBStreamsClient({ region: 'us-west-2' });\n\nconst getRecords = async (shardIterator) => {\n  const command = new GetRecordsCommand({ ShardIterator: shardIterator });\n  const response = await client.send(command);\n  console.log(response.Records);\n};\n\ngetRecords('your-shard-iterator');"}

Other packages similar to @aws-sdk/client-dynamodb-streams

FAQs

Package last updated on 02 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc