aws-kinesisstreams-kinesisfirehose-s3 - AWS Solutions Constructs

aws-kinesisstreams-kinesisfirehose-s3

All classes are under active development and subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.

Language Package
Python
aws_solutions_constructs.aws_kinesisstreams_kinesisfirehose_s3
Typescript
@aws-solutions-constructs/aws-kinesis-streams-kinesis-firehose-s3
Java
software.amazon.awsconstructs.services.kinesisstreamskinesisfirehoses3

This AWS Solutions Construct implements an Amazon Kinesis Data Stream (KDS) connected to Amazon Kinesis Data Firehose (KDF) delivery stream connected to an Amazon S3 bucket.

Here is a minimal deployable pattern definition in TypeScript:

import { KinesisStreamsToKinesisFirehoseToS3 } from '@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3'; new KinesisStreamsToKinesisFirehoseToS3(this, 'test-stream-firehose-s3', {});

Initializer

new KinesisStreamsToKinesisFirehoseToS3(scope: Construct, id: string, props: KinesisStreams...ToS3Props);

Parameters

Pattern Construct Props

Name Type Description
bucketProps? s3.BucketProps Optional user provided props to override the default props for the S3 Bucket.
createCloudWatchAlarms? boolean Optional whether to create recommended CloudWatch alarms.
existingBucketObj? s3.IBucket Optional existing instance of S3 Bucket object, if this is set then bucketProps and existingLoggingBucketObj are ignored.
existingLoggingBucketObj? s3.IBucket Optional existing instance of logging S3 Bucket object for the S3 Bucket created by the pattern.
existingStreamObj? kinesis.Stream Optional existing instance of Kinesis Stream, if this is set then kinesisStreamProps is ignored.
kinesisFirehoseProps? aws-kinesisfirehose.CfnDeliveryStreamProps | any Optional user provided props to override the default props for Kinesis Firehose Delivery Stream.
kinesisStreamProps? kinesis.StreamProps Optional user provided props to override the default props for the Kinesis stream.
logGroupProps? logs.LogGroupProps Optional user provided props to override the default props for for the CloudWatchLogs Log Group.

Pattern Properties

Name Type Description
cloudwatchAlarms? cloudwatch.Alarm[] Returns a list of cloudwatch.Alarm instances created by the construct.
kinesisFirehose kinesisfirehose.CfnDeliveryStream Returns an instance of kinesisfirehose.CfnDeliveryStream created by the construct.
kinesisFirehoseLogGroup logs.LogGroup Returns an instance of the logs.LogGroup created by the construct for Kinesis Data Firehose delivery stream.
kinesisFirehoseRole iam.Role Returns an instance of the iam.Role created by the construct for Kinesis Data Firehose delivery stream.
kinesisStreamRole iam.Role Returns an instance of the iam.Role created by the construct for Kinesis stream.
s3Bucket? s3.Bucket Returns an instance of s3.Bucket created by the construct.
s3LoggingBucket? s3.Bucket Returns an instance of s3.Bucket created by the construct as the logging bucket for the primary bucket.

Default settings

Out-of-the-box implementation of this pattern without any overrides will set the following defaults:

Amazon Kinesis Stream

  • Configure least privilege access IAM role for Kinesis Stream

  • Enable server-side encryption for Kinesis Stream using AWS Managed KMS Key

  • Deploy best practices CloudWatch Alarms for the Kinesis Stream

Amazon Kinesis Firehose

  • Enable CloudWatch logging for Kinesis Firehose

  • Configure least privilege access IAM role for Amazon Kinesis Firehose

Amazon S3 Bucket

  • Configure access logging for S3 bucket

  • Enable server-side encryption for S3 bucket using AWS managed KMS Key

  • Enforce encryption of data in transit

  • Enable bucket versioning

  • Don't allow public access for S3 bucket

  • Retain the S3 Bucket when deleting the CloudFormation stack

  • Apply lifecycle rule to move noncurrent object versions to Glacier storage after 90 days

Architecture

GitHub

To view the code for this pattern, create/view issues and pull requests, and more:
@aws-solutions-constructs/aws-kinesisstreams-kinesisfirehose-s3