AWS CDK Kinesis Firehose Destinations (Alpha - Deprecated)

2.186.0a0 · deprecated · verified Fri Apr 17

This Python package provided experimental (alpha) AWS CDK constructs for defining destinations for Kinesis Firehose delivery streams. It is officially deprecated as of CDK v2.186.0a0, and all its constructs have been merged into the main `aws-cdk-lib` package. Users should migrate to the equivalent constructs within `aws_cdk.aws_kinesisfirehose_destinations` for stable and actively maintained functionality. This package will no longer receive updates.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to create a Kinesis Firehose delivery stream with an S3 destination using the stable `aws-cdk-lib` imports, which replaced the functionality of the deprecated `aws-cdk-aws-kinesisfirehose-destinations-alpha`.

import os
from aws_cdk import (
    App,
    Stack,
    Environment,
    aws_s3 as s3,
    aws_kinesisfirehose as kinesisfirehose,
    aws_kinesisfirehose_destinations as kinesisfirehose_destinations,
)
from constructs import Construct

class MyFirehoseStack(Stack):
    def __init__(self, scope: Construct, id: str, **kwargs) -> None:
        super().__init__(scope, id, **kwargs)

        # Create an S3 Bucket for the Firehose destination
        bucket = s3.Bucket(
            self, "FirehoseDestinationBucket",
            bucket_name=f"my-firehose-target-{self.account}-{self.region}",
        )

        # Define the S3 destination for Kinesis Firehose using the stable module
        s3_destination = kinesisfirehose_destinations.S3BucketDestination(
            bucket,
            # Optional: configure compression, buffer, etc.
            # compression=kinesisfirehose_destinations.Compression.GZIP,
        )

        # Create a Kinesis Firehose Delivery Stream
        firehose_stream = kinesisfirehose.DeliveryStream(
            self, "MyFirehoseStream",
            destinations=[s3_destination],
            delivery_stream_name="my-app-firehose-stream-stable",
        )

app = App()
MyFirehoseStack(app, "MyFirehoseStack",
    env=Environment(
        account=os.environ.get('CDK_DEFAULT_ACCOUNT', '123456789012'),
        region=os.environ.get('CDK_DEFAULT_REGION', 'us-east-1')
    )
)
app.synth()

view raw JSON →