Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS AppSync: add EventBridge as L2 datasource #24809

Closed
1 of 2 tasks
mtliendo opened this issue Mar 27, 2023 · 3 comments · Fixed by #25369
Closed
1 of 2 tasks

AWS AppSync: add EventBridge as L2 datasource #24809

mtliendo opened this issue Mar 27, 2023 · 3 comments · Fixed by #25369
Labels
@aws-cdk/aws-appsync Related to AWS AppSync effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@mtliendo
Copy link

Describe the feature

This feature adds eventBridge as an L2 construct following the release of the L1 construct

Use Case

Customers should have an easy way to add EventBridge as a datasource alongside the current L2 datasource options.

Proposed Solution

// datasource.ts
/**
 * Properties for an AppSync EventBridge datasource
 */
export interface EventBridgeDataSourceProps extends BackedDataSourceProps {
	/**
	 * The EventBridge function to call to interact with this data source
	 */
	readonly eventBridgeBus: IEventBus
}

/**
 * An AppSync datasource backed by a EventBridge function
 */
export class EventBridgeDataSource extends BackedDataSource {
	constructor(scope: Construct, id: string, props: EventBridgeDataSourceProps) {
		super(scope, id, props, {
			type: 'AWS_EVENTBRIDGE',
			eventBridgeConfig: {
				eventBridgeBusArn: props.eventBridgeBus.eventBusArn,
			},
		})
		props.eventBridgeBus.grantInvoke(this)
	}
}

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

0.00.0

Environment details (OS name and version, etc.)

mac m1 mbp

@mtliendo mtliendo added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Mar 27, 2023
@github-actions github-actions bot added the @aws-cdk/aws-appsync Related to AWS AppSync label Mar 27, 2023
@pahud
Copy link
Contributor

pahud commented Mar 28, 2023

Thank you @mtliendo. I believe the core team will review your PR soon.

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Mar 28, 2023
@postsa
Copy link
Contributor

postsa commented May 1, 2023

@pahud I've implemented this with #25369

@mergify mergify bot closed this as completed in #25369 May 3, 2023
mergify bot pushed a commit that referenced this issue May 3, 2023
Adds an L2 EventBridge data source to AppSync.

Closes #24809.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

github-actions bot commented May 3, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-appsync Related to AWS AppSync effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
3 participants