aws-events-rule-kinesisfirehose-s3 - AWS Solutions Constructs

aws-events-rule-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_events_rule_kinesisfirehose_s3
Typescript
@aws-solutions-constructs/aws-events-rule-kinesisfirehose-s3
Java
software.amazon.awsconstructs.services.eventsrulekinesisfirehoses3

Overview

This AWS Solutions Construct implements an Amazon CloudWatch Events rule to send data to an Amazon Kinesis Data Firehose delivery stream connected to an Amazon S3 bucket.

Here is a minimal deployable pattern definition in TypeScript:

import * as cdk from '@aws-cdk/core'; import { EventsRuleToKinesisFirehoseToS3, EventsRuleToKinesisFirehoseToS3Props } from '@aws-solutions-constructs/aws-events-rule-kinesisfirehose-s3'; const eventsRuleToKinesisFirehoseToS3Props: EventsRuleToKinesisFirehoseToS3Props = { eventRuleProps: { schedule: events.Schedule.rate(cdk.Duration.minutes(5)) } }; new EventsRuleToKinesisFirehoseToS3(this, 'test-events-rule-firehose-s3', eventsRuleToKinesisFirehoseToS3Props);

Initializer

new EventsRuleToKinesisFirehoseToS3(scope: Construct, id: string, props: EventsRuleToKinesisFirehoseToS3Props);

Parameters

Pattern Construct Props

Name Type Description
eventRuleProps events.RuleProps User-provided properties to override the default properties for the CloudWatch Events rule.
kinesisFirehoseProps? aws-kinesisfirehose.CfnDeliveryStreamProps Optional user provided props to override the default props for Kinesis Firehose Delivery Stream.
existingBucketObj? s3.Bucket An optional, existing S3 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 props to override the default props for the S3 bucket.
logGroupProps? logs.LogGroupProps Optional user-provided props to override the default props for the CloudWatch Logs log group.

Pattern Properties

Name Type Description
eventsRule events.Rule Returns an instance of the Events rule created by the pattern.
kinesisFirehose kinesisfirehose.CfnDeliveryStream Returns an instance of the Kinesis Firehose delivery stream created by the pattern.
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.
eventsRole? iam.Role Returns an instance of the role created by the construct for the CloudWatch Events rule.
kinesisFirehoseRole iam.Role Returns an instance of the IAM role created by the pattern for the Kinesis Firehose delivery stream.
kinesisFirehoseLogGroup logs.LogGroup Returns an instance of the log group created by the pattern that Kinesis Firehose access logs are sent to.

Default settings

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

Amazon CloudWatch Events rule

  • Configure least privilege access IAM role for Events Rule to publish to the Kinesis Firehose Delivery 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 bucket.

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

  • Turn on the versioning for the bucket.

  • Don't allow public access for the bucket.

  • Retain the bucket when deleting the CloudFormation stack.

  • Applies 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-events-rule-kinesisfirehose-s3