aws / aws/aws-cdk

aws_appsync: Support for eventbridge datasource

Open
#25,353 4 comments 0 reactions 0 assignees View on GitHub
@aws-cdk/aws-appsync effort/medium feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the feature

I would like to be able to use the eventbridge datasource type with the aws_appsync_alpha module. At the moment, this seems impossible.

### Use Case

I want to be able to publish events to eventbridge from my appsync api. This is a very common pattern in my application.

### Proposed Solution

Extend the BaseDataSource class to handle the eventbridge datasource type and add a add_eventbridge_data_source function to the GraphqlApi class.

### Other Information

I tried to use the CfnDataSource class from aws_appsync in combo with AppsyncFunction from the aws_appsync_alpha module but that throws me the error:

TypeError: type of argument data_source must be aws_cdk.aws_appsync_alpha.BaseDataSource; got aws_cdk.aws_appsync.CfnDataSource instead

### Acknowledgements

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### CDK version used

2.77.0 (build 06a0b19)

### Environment details (OS name and version, etc.)

MacOs Ventura 13.3.1 (22E261)

Contributor guide

Open the contributing guide

Research direction

Start with the aws_appsync_alpha BaseDataSource and GraphqlApi entry points named in the proposal, then compare them with the aws_appsync CfnDataSource EventBridge type. Reproduce the data_source type error and verify that an EventBridge data source can be added to a GraphQL API and used by AppsyncFunction.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
api, cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.