Skip to content

Conversation

@Tietew
Copy link
Contributor

@Tietew Tietew commented Mar 4, 2025

Issue # (if applicable)

Closes #32038.
Closes #24766.

Reason for this change

Adding support of Amazon Data Firehose destination was waiting for stabilize aws-kinesisfirehose.

Description of changes

Added the FirehoseDestination logs destination class.
Usage:

declare const logGroup: logs.LogGroup;
declare const stream: firehose.DeliveryStream;

new logs.SubscriptionFilter(stack, 'SubscriptionFilter', {
  logGroup,
  destination: new destinations.FirehoseDestination(stream),
  filterPattern: logs.FilterPattern.allEvents(),
});

Describe any new or updated permissions being added

Following permissions will be granted to a role of destination.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/SubscriptionFilters.html#FirehoseExample

Description of how you validated changes

Unit tests and integ test.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added effort/small Small work item – less than a day of effort star-contributor [Pilot] contributed between 25-49 PRs to the CDK feature-request A feature should be added or improved. p2 labels Mar 4, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team March 4, 2025 07:58
@codecov
Copy link

codecov bot commented Mar 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.98%. Comparing base (c0f8d29) to head (36d476e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #33683   +/-   ##
=======================================
  Coverage   83.98%   83.98%           
=======================================
  Files         120      120           
  Lines        6976     6976           
  Branches     1178     1178           
=======================================
  Hits         5859     5859           
  Misses       1005     1005           
  Partials      112      112           
Flag Coverage Δ
suite.unit 83.98% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
packages/aws-cdk ∅ <ø> (∅)
packages/aws-cdk-lib/core 83.98% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Tietew Tietew force-pushed the logs-destinations-firehose branch from 6440886 to 96745ab Compare March 4, 2025 08:29
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Mar 4, 2025
@Tietew Tietew changed the title feat(logs-destinations): add support of Amazon Data Firehose destination feat(logs-destinations): support Amazon Data Firehose logs destination Mar 5, 2025
@Tietew
Copy link
Contributor Author

Tietew commented Mar 12, 2025

@humanzz I missed it. Thank you.

@github-actions github-actions bot added effort/medium Medium work item – several days of effort and removed effort/small Small work item – less than a day of effort labels Mar 12, 2025
Copy link
Contributor

@mazyu36 mazyu36 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution. Just one question.

const app = new App();
const stack = new FirehoseEnv(app, 'firehose-logsubscription-integ');

// If the proper dependency is not set, then the deployment fails with:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please explain the intention of these comments?
My understanding is that since you have implemented the construct to ensure proper dependencies, users don't need to be conscious of it when using it. Is this correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. This comment says the destination class FirehoseDestination ensures the proper dependency of Policy resource.

@aws-cdk-automation aws-cdk-automation added pr/needs-maintainer-review This PR needs a review from a Core Team Member and removed pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. labels Mar 19, 2025
@mergify
Copy link
Contributor

mergify bot commented Apr 1, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Apr 1, 2025
@mergify
Copy link
Contributor

mergify bot commented Apr 1, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 36d476e
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Apr 2, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit a8edf69 into aws:main Apr 2, 2025
20 checks passed
@github-actions
Copy link
Contributor

github-actions bot commented Apr 2, 2025

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 2, 2025
@Tietew Tietew deleted the logs-destinations-firehose branch April 2, 2025 02:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 star-contributor [Pilot] contributed between 25-49 PRs to the CDK

Projects

None yet

5 participants