aws-kinesisfirehose-s3-and-kinesisanalytics - AWS Solutions Constructs

aws-kinesisfirehose-s3-and-kinesisanalytics

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_kinesisfirehose_s3_and_kinesisanalytics
Typescript
@aws-solutions-constructs/aws-kinesisfirehose-s3-and-kinesisanalytics
Java
software.amazon.awsconstructs.services.kinesisfirehoses3kinesisanalytics

This AWS Solutions Constructs pattern implements an Amazon Kinesis Firehose delivery stream connected to an Amazon S3 bucket, and an Amazon Kinesis Analytics application.

Here is a minimal deployable pattern definition:

const { KinesisFirehoseToAnalyticsAndS3 } = require('@aws-solutions-constructs/aws-kinesisfirehose-s3-and-kinesisanalytics'); new KinesisFirehoseToAnalyticsAndS3(stack, 'FirehoseToS3AndAnalyticsPattern', { kinesisAnalyticsProps: { inputs: [{ inputSchema: { recordColumns: [{ name: 'ticker_symbol', sqlType: 'VARCHAR(4)', mapping: '$.ticker_symbol' }, { name: 'sector', sqlType: 'VARCHAR(16)', mapping: '$.sector' }, { name: 'change', sqlType: 'REAL', mapping: '$.change' }, { name: 'price', sqlType: 'REAL', mapping: '$.price' }], recordFormat: { recordFormatType: 'JSON' }, recordEncoding: 'UTF-8' }, namePrefix: 'SOURCE_SQL_STREAM' }] } });

Initializer

new KinesisFirehoseToAnalyticsAndS3(scope: Construct, id: string, props: KinesisFirehoseToAnalyticsAndS3Props);

Parameters

Pattern Construct Props

Name Type Description
kinesisFirehoseProps? kinesisFirehose.CfnDeliveryStreamProps Optional user-provided props to override the default props for the Kinesis Firehose delivery stream.
kinesisAnalyticsProps? kinesisAnalytics.CfnApplicationProps Optional user-provided props to override the default props for the Kinesis Analytics application.
existingBucketObj? s3.Bucket An optional, existing bucket to be used instead of the default bucket. If an existing bucket is provided, the bucketProps property will be ignored.
bucketProps? s3.BucketProps Optional user-provided properties to override the default properties for the bucket. Ignored if an existingBucketObj is provided.

Pattern Properties

Name Type Description
kinesisAnalytics kinesisAnalytics.CfnApplication Returns an instance of the Kinesis Analytics application created by the pattern.
kinesisFirehose kinesisfirehose.CfnDeliveryStream Returns an instance of the Kinesis Firehose delivery stream created by the pattern.
kinesisFirehoseLogGroup logs.LogGroup Returns an instance of the log group created by the pattern that Kinesis Firehose access logs are sent to.
kinesisFirehoseRole iam.Role Returns an instance of the IAM role created by the pattern for the Kinesis Firehose delivery stream.
s3Bucket s3.Bucket Returns an instance of the S3 bucket created by the pattern.
s3LoggingBucket? s3.Bucket Returns an instance of the logging bucket created by the pattern for the S3 bucket.

Default settings

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

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

  • Turn on the versioning for S3 Bucket

  • Don't allow public access for S3 Bucket

  • Retain the S3 Bucket when deleting the CloudFormation stack

  • Enforce encryption of data in transit

Amazon Kinesis Data Analytics

  • Configure least privilege access IAM role for Amazon Kinesis Analytics

Architecture