aws-cdk-lib/aws-events: Support for Cross Account SNS/SQS/Lambda Targets
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 74
Description
### Describe the feature
EventBridge recently released [cross account targets](https://aws.amazon.com/about-aws/whats-new/2025/01/amazon-eventbridge-direct-delivery-cross-account-targets/) which allows customers to send events to SQS queues, SNS topics, Lambda functions, Kinesis Streams, and API Gateway endpoints in another account provided the target account has granted permissions via resource policies. Before this release, SQS/SNS/Lambda required customers to NOT provide a role and the current implementation of CDK supports that constraint. With this release, customers are required to provide a role from the rule's account for cross account resource access.
We're requesting updates to the CDK libraries to allow for roles to be provided for the following constructs:
* https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events_targets.SqsQueue.html
* https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events_targets.SnsTopic.html
* https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events_targets.LambdaFunction.html
### Use Case
Customers would like to be able to setup Cross Account targets for SNS/SQS/Lambda targets via our L2 constructs.
### Proposed Solution
_No response_
### Other Information
_No response_
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CDK version used
2.178.0
### Environment details (OS name and version, etc.)
Mac OSX 15.3
Contributor guide
Research direction
Start with the SqsQueue, SnsTopic, and LambdaFunction target constructs linked in the issue, and review how they currently handle roles and cross-account targets. Compare that behavior with EventBridge's cross-account requirements; done means each construct can accept the required rule-account role while preserving existing same-account behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100