python/example_code/firehose/scenarios/firehose-put-actions/README.md
This example shows how to use AWS SDKs to perform common actions with Amazon Data Firehose, such as putting individual records (PutRecord) and batches of records (PutRecordBatch) to a delivery stream.
The Data Firehose API has a maximum limit of 500 records or 4MB per request for PutRecordBatch. This example demonstrates how to handle scenarios where the number of records exceeds the maximum limit by breaking down the requests into multiple batches.
The following components are used in this example:
For detailed information on this workflow, see the firehose/README.md.
For Python language prerequisites, see /python/README.md.
To run this example, you need to set up the necessary infrastructure and generate mock data. Follow the steps outlined in the workflow README to create a Data Firehose delivery stream and generate sample data.
python firehose.pyThis script will perform the following actions:
PutRecord API.PutRecordBatch API.IncomingBytes and IncomingRecords metrics to ensure there is incoming traffic, and FailedPutCount for batch operations.Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0