Skip to content

Conversation

@Tietew
Copy link
Contributor

@Tietew Tietew commented Mar 18, 2025

Issue # (if applicable)

Closes #14391.

Reason for this change

We can subscribe Amazon Data Firehose delivery streams to Amazon SNS topics.
For details, see https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html

Description of changes

Added the FirehoseSubscription integration class.

Describe any new or updated permissions being added

A role will be created to write messages to Firehose.
For details of permissions, see https://docs.aws.amazon.com/sns/latest/dg/prereqs-kinesis-data-firehose.html

Description of how you validated changes

Unit tests and integ tests.

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 feature-request A feature should be added or improved. p2 labels Mar 18, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team March 18, 2025 06:53
@github-actions github-actions bot added the star-contributor [Pilot] contributed between 25-49 PRs to the CDK label Mar 18, 2025
@codecov
Copy link

codecov bot commented Mar 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.38%. Comparing base (2dc5d70) to head (f0d9af3).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #33811   +/-   ##
=======================================
  Coverage   82.38%   82.38%           
=======================================
  Files         120      120           
  Lines        6938     6938           
  Branches     1170     1170           
=======================================
  Hits         5716     5716           
  Misses       1119     1119           
  Partials      103      103           
Flag Coverage Δ
suite.unit 82.38% <ø> (ø)

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 82.38% <ø> (ø)
🚀 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.

@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 18, 2025
@Tietew Tietew changed the title feat(sns-subscriptions): add support Amazon Data Firehose subscription feat(sns-subscriptions): support Amazon Data Firehose subscription Mar 24, 2025
@Abogical Abogical self-assigned this May 28, 2025
'firehose:PutRecordBatch',
],
resources: [this.deliveryStream.deliveryStreamArn],
}));
Copy link
Member

Choose a reason for hiding this comment

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

You can use the Grant API instead of adding the policies inline (see here).

import * as sns from '../../../aws-sns';
import { ArnFormat, IResource, Token, Stack } from '../../../core';

export function regionFromArn(topic: sns.ITopic, resource: IResource): string | undefined {
Copy link
Member

Choose a reason for hiding this comment

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

Nice refactor!

Resource: { 'Fn::GetAtt': ['DeliveryStream58CF96DB', 'Arn'] },
}],
},
});
Copy link
Member

@Abogical Abogical May 28, 2025

Choose a reason for hiding this comment

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

You can add a check to make sure that stack dependencies are set correctly. Add an assertion to check that firehoseStack.dependencies() includes topicStack.

@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label May 28, 2025
@mergify mergify bot dismissed Abogical’s stale review May 29, 2025 03:52

Pull request has been modified.

@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 May 29, 2025
@Tietew
Copy link
Contributor Author

Tietew commented May 29, 2025

@Abogical
Thanks for review!
I've pushed updates.

@mergify
Copy link
Contributor

mergify bot commented Jun 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).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: cabd834
  • 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 Jun 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).

1 similar comment
@mergify
Copy link
Contributor

mergify bot commented Jun 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 632179c into aws:main Jun 2, 2025
16 checks passed
@github-actions
Copy link
Contributor

github-actions bot commented Jun 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 Jun 2, 2025
@Tietew Tietew deleted the sns-firehose-subscriptions branch June 2, 2025 09:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2 pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. star-contributor [Pilot] contributed between 25-49 PRs to the CDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(@aws-cdk/aws-sns-subscriptions): add support for firehose endpoint

3 participants