Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-sdk/client-firehose

Package Overview
Dependencies
Maintainers
5
Versions
424
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/client-firehose

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

  • 3.712.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2M
increased by24%
Maintainers
5
Weekly downloads
 
Created

What is @aws-sdk/client-firehose?

@aws-sdk/client-firehose is a part of the AWS SDK for JavaScript, which allows developers to interact with Amazon Kinesis Data Firehose. This service is used for reliably loading streaming data into data lakes, data stores, and analytics services. The package provides methods to create, manage, and delete delivery streams, as well as to send data to these streams.

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

Create Delivery Stream

This feature allows you to create a new delivery stream in Amazon Kinesis Data Firehose. The code sample demonstrates how to create a delivery stream with an S3 destination configuration.

const { FirehoseClient, CreateDeliveryStreamCommand } = require('@aws-sdk/client-firehose');

const client = new FirehoseClient({ region: 'us-west-2' });
const params = {
  DeliveryStreamName: 'example-stream',
  S3DestinationConfiguration: {
    BucketARN: 'arn:aws:s3:::example-bucket',
    RoleARN: 'arn:aws:iam::123456789012:role/firehose_delivery_role'
  }
};

const run = async () => {
  try {
    const data = await client.send(new CreateDeliveryStreamCommand(params));
    console.log('Delivery Stream Created', data);
  } catch (err) {
    console.error(err);
  }
};

run();

Put Record

This feature allows you to send a single data record to a delivery stream. The code sample demonstrates how to put a record into a specified delivery stream.

const { FirehoseClient, PutRecordCommand } = require('@aws-sdk/client-firehose');

const client = new FirehoseClient({ region: 'us-west-2' });
const params = {
  DeliveryStreamName: 'example-stream',
  Record: {
    Data: Buffer.from('example data')
  }
};

const run = async () => {
  try {
    const data = await client.send(new PutRecordCommand(params));
    console.log('Record Sent', data);
  } catch (err) {
    console.error(err);
  }
};

run();

Delete Delivery Stream

This feature allows you to delete an existing delivery stream. The code sample demonstrates how to delete a specified delivery stream.

const { FirehoseClient, DeleteDeliveryStreamCommand } = require('@aws-sdk/client-firehose');

const client = new FirehoseClient({ region: 'us-west-2' });
const params = {
  DeliveryStreamName: 'example-stream'
};

const run = async () => {
  try {
    const data = await client.send(new DeleteDeliveryStreamCommand(params));
    console.log('Delivery Stream Deleted', data);
  } catch (err) {
    console.error(err);
  }
};

run();

Other packages similar to @aws-sdk/client-firehose

FAQs

Package last updated on 13 Dec 2024

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