-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Labels
@aws-cdk/aws-kinesisfirehoseRelated to Amazon Kinesis Data FirehoseRelated to Amazon Kinesis Data Firehoseeffort/mediumMedium work item – several days of effortMedium work item – several days of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p2
Description
Describe the feature
Data Firehose supports following convenient conversions:
- Decompress CloudWatch logs
- Extract message after decompression of CloudWatch Logs
- Add a new line delimiter when delivering data to Amazon S3
Use Case
- To use Firehose Data Format Conversion (Parquet, ORC) or Dynamic partitioning, decompression must be enabled.
- These features enable us to avoid decompressing and extracting log entries explicitly on analyze collected logs.
Proposed Solution
They are implemented as processors.
PoC code:
declare const bucket: s3.Bucket;
declare const func: lambda.Function;
new firehose.DeliveryStream(this, 'DeliveryStream', {
destination: new firehose.S3Bucket(bucket, {
processors: [
new firehose.DecompressionProcessor(),
new firehose.CloudWatchProcessingProcessor(),
new firehose.LambdaFunctionProcessor(func),
new firehose.AppendDelimiterToRecordProcessor(),
],
}),
});
will generate a CloudFormation template like:
{
"ExtendedS3DestinationDescription": {
// other configurations
"ProcessingConfiguration": {
"Enabled": true,
"Processors": [
{
"Type": "Decompression",
"Parameters": [
{
"ParameterName": "CompressionFormat",
"ParameterValue": "GZIP"
}
]
},
{
"Type": "CloudWatchLogProcessing",
"Parameters": [
{
"ParameterName": "DataMessageExtraction",
"ParameterValue": "true"
}
]
},
{
"Type": "Lambda",
"Parameters": [
{
"ParameterName": "LambdaArn",
"ParameterValue": "arn:aws:lambda:..."
},
{
"ParameterName": "RoleArn",
"ParameterValue": "arn:aws:iam:..."
}
]
},
{
"Type": "AppendDelimiterToRecord",
"Parameters": []
}
]
}
}
}
Other Information
Related issues and PRs:
- aws-logs-destinations: Missing
FirehoseDestination
orDataFirehoseDestination
#32038 - feat(logs-destinations): support Amazon Data Firehose logs destination #33683
- (aws-kinesisfirehose): Record format conversion with AWS Glue for DeliveryStream S3 destination #15501
- aws-kinesisfirehose-destinations-alpha: Support dynamic partitioning with inline parsing #28740
- Add delimiter and/or generic implementation of IDataProcessor for Kinesis Firehose #20242
- feat(kinesisfirehose): add built-in data processors to decompress CloudWatch logs and extract messages #33749
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
CDK version used
2.181.0
Environment details (OS name and version, etc.)
Linux
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-kinesisfirehoseRelated to Amazon Kinesis Data FirehoseRelated to Amazon Kinesis Data Firehoseeffort/mediumMedium work item – several days of effortMedium work item – several days of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p2