aws_ddk_core.stages.KinesisToS3Stage

class aws_ddk_core.stages.KinesisToS3Stage(*args: Any, **kwargs)

Class that represents a Firehose to S3 Ingestion DDK Stage.

__init__(scope: constructs.Construct, id: str, environment_id: str, delivery_stream_name: typing.Optional[str] = None, bucket_name: typing.Optional[str] = None, buffering_interval: typing.Optional[aws_cdk.Duration] = None, buffering_size: typing.Optional[aws_cdk.Size] = None, compression: typing.Optional[aws_cdk.aws_kinesisfirehose_destinations_alpha.Compression] = <aws_cdk.aws_kinesisfirehose_destinations_alpha.Compression object>, data_output_prefix: typing.Optional[str] = None, data_stream_enabled: typing.Optional[bool] = False, encryption_key: typing.Optional[aws_cdk.aws_kms.IKey] = None, error_output_prefix: typing.Optional[str] = None, logging: typing.Optional[bool] = True, log_group: typing.Optional[aws_cdk.aws_logs.ILogGroup] = None, kinesis_delivery_stream_alarm_threshold: typing.Optional[int] = 900, kinesis_delivery_stream_alarm_evaluation_periods: typing.Optional[int] = 1, delivery_stream: typing.Optional[aws_cdk.aws_kinesisfirehose_alpha.IDeliveryStream] = None, bucket: typing.Optional[aws_cdk.aws_s3.IBucket] = None, data_stream: typing.Optional[aws_cdk.aws_kinesis.Stream] = None) None

DDK Kinesis Firehose Delivery stream to S3 stage, with an optional Kinesis Data Stream.

Parameters
  • scope (Construct) – Scope within which this construct is defined

  • id (str) – Identifier of the stage

  • environment_id (str) – Identifier of the environment

  • delivery_stream_name (Optional[str] = None) – Name of the Firehose Delivery Stream

  • bucket_name (Optional[str] = None) – Name of S3 Bucket to be created as a delivery destination. Amazon EventBridge notifications must be enabled on the bucket in order for this stage to produce events after its completion.

  • buffering_interval (Optional[Duration] = None) – The length of time that Firehose buffers incoming data before delivering it to the S3 bucket. Minimum: Duration.seconds(60) Maximum: Duration.seconds(900) Default: Duration.seconds(300)

  • buffering_size (Optional[Size] = None) – The size of the buffer that Kinesis Data Firehose uses for incoming data before delivering it to the S3 bucket. Minimum: Size.mebibytes(1) Maximum: Size.mebibytes(128) Default: Size.mebibytes(5)

  • compression (Optional[Compression] = None) – The type of compression that Kinesis Data Firehose uses to compress the data that it delivers to the Amazon S3 bucket. Default: - GZIP

  • data_output_prefix (Optional[str] = None) – A prefix that Kinesis Data Firehose evaluates and adds to records before writing them to S3. This prefix appears immediately following the bucket name. Default: “YYYY/MM/DD/HH”

  • data_stream_enabled (Optional[bool] = False) – Add Kinesis Data Stream to front Firehose Delivery. Default: false

  • encryption_key (Optional[IKey] = None) – The AWS KMS key used to encrypt the data delivered to your Amazon S3 bucket

  • error_output_prefix (Optional[str] = None) – prefix that Kinesis Data Firehose evaluates and adds to failed records before writing them to S3. This prefix appears immediately following the bucket name. Default: “YYYY/MM/DD/HH”

  • logging (Optional[bool] = True) – If true, log errors when data transformation or data delivery fails. If log_group is provided, this will be implicitly set to true. Default: true - errors are logged.

  • log_group (Optional[ILogGroup] = None) – The CloudWatch log group where log streams will be created to hold error logs. Default: - if logging is set to true, a log group will be created for you.

  • kinesis_delivery_stream_alarm_threshold (Optional[int] = 900) – Threshold for Cloudwatch Alarm created for this stage. Default: 900

  • kinesis_delivery_stream_alarm_evaluation_periods (Optional[int] = 1) – Evaluation period value for Cloudwatch alarm created for this stage. Default: 1

  • delivery_stream (Optional[firehose.IDeliveryStream] = None) – Preexisting Delivery Stream to use in this stage

  • bucket (Optional[IBucket] = None) – Preexisting S3 Bucket to use as a destination for the Firehose Stream. If no bucket is provided, a new one is created. Amazon EventBridge notifications must be enabled on the bucket in order for this stage to produce events after its completion.

  • data_stream (Optional[Stream] = None) – Preexisting Kinesis Data Stream to use in stage before Delivery Stream. Setting this parameter will override any creation of Kinesis Data Streams in this stage. data_stream_enabled will have no effect.

Methods

__init__(scope, id, environment_id[, ...])

DDK Kinesis Firehose Delivery stream to S3 stage, with an optional Kinesis Data Stream.

add_alarm(alarm_id, alarm_metric[, ...])

Add a CloudWatch alarm for the Data Stage

get_event_pattern()

Get output event pattern of the stage.

get_targets()

Get input targets of the stage.

is_construct(x)

Checks if x is a construct.

to_string()

Returns a string representation of this construct.

Attributes

bucket

S3 Bucket The S3 Destination Bucket

cloudwatch_alarms

List[Alarm] List of CloudWatch Alarms linked to the stage

data_stream

Data Stream The Kinesis Data Stream

delivery_stream

Delivery Stream The Kinesis Firehose Delivery Stream

event_pattern

EventPattern The S3 event pattern

node

The tree node.

property bucket: aws_cdk.aws_s3.IBucket

S3 Bucket The S3 Destination Bucket

Type

Return

property data_stream: aws_cdk.aws_kinesis.Stream

Data Stream The Kinesis Data Stream

Type

Return

property delivery_stream: aws_cdk.aws_kinesisfirehose_alpha.IDeliveryStream

Delivery Stream The Kinesis Firehose Delivery Stream

Type

Return

property event_pattern: aws_cdk.aws_events.EventPattern

EventPattern The S3 event pattern

Type

Return

get_event_pattern() Optional[aws_cdk.aws_events.EventPattern]

Get output event pattern of the stage.

Event pattern describes the structure of output event(s) produced by this stage. Event Rules use event patterns to select events and route them to targets.

Returns

event_pattern – Event pattern

Return type

Optional[EventPattern]

get_targets() Optional[List[aws_cdk.aws_events.IRuleTarget]]

Get input targets of the stage.

Targets are used by Event Rules to describe what should be invoked when a rule matches an event.

Returns

targets – List of targets

Return type

Optional[List[IRuleTarget]]