amplify-category-api icon indicating copy to clipboard operation
amplify-category-api copied to clipboard

EventBridge supports AWS AppSync as a target

Open OperationalFallacy opened this issue 1 year ago • 6 comments

Is this feature request related to a new or existing Amplify category?

api, notifications

Is this related to another service?

EventBridge

Describe the feature you'd like to request

AppSync integrates with EventBridge well:

Amazon EventBridge now supports AWS AppSync as a target of EventBridge Buses https://aws.amazon.com/about-aws/whats-new/2024/01/amazon-eventbridge-appsync-target-buses/

https://serverlessland.com/patterns/appsync-eventbridge-cdk The other way around is also true, AppSync can publish to EventBridge

I'd like to publish events easily to EventBridge and subscribe to updates in the UI. This is particularly useful for workflows such as:

  1. Long-running tasks to show update progress or status (current has to be implemented via DDB updates)
  2. Scores, ticks, streaming updates are good candidates too

Describe the solution you'd like

Add or update models in the schema that allow to interact with EventBridge

Describe alternatives you've considered

Some CDK code and resolvers (resolvers are pretty much a none starter for me because of the weird syntax and updates workflow)

Additional context

No response

Is this something that you'd be interested in working on?

  • [ ] 👋 I may be able to implement this feature request

Would this feature include a breaking change?

  • [ ] ⚠️ This feature might incur a breaking change

OperationalFallacy avatar Feb 19 '24 22:02 OperationalFallacy

Hey @OperationalFallacy, thank you for filing this. Wondering if Amplify Gen 2 maybe a ideal for this use case as it utilizes AWS CDK. Please refer to https://docs.amplify.aws/gen2/ for additional information.

ykethan avatar Feb 20 '24 14:02 ykethan

I agree; it might be the shortest path.

You know the internals of CDK stacks for amplify gen 2

Can you assess how easy this example for EventBridge to AppSync to use as a custom resource in Amplify?

There is that VTL "template" that pretty much is a non-starter. I'd be ok to own CDK part, the VTL is just too much overhead.

OperationalFallacy avatar Feb 20 '24 14:02 OperationalFallacy

@OperationalFallacy, I'm going to transfer this over to our API repository for better assistance and tracking 🙂 . but did remember seeing an similar example from AppSync DA here: https://blog.focusotter.com/how-aws-appsync-and-amazon-eventbridge-unlock-real-time-data-across-domains

ykethan avatar Feb 20 '24 17:02 ykethan

Hey @OperationalFallacy, Thank you for your request. We will label this as a feature request for the team to review in more detail.

AnilMaktala avatar Feb 21 '24 14:02 AnilMaktala

Ty, Anil that article is a great example, especially for somebody how doesn't mind deal with the L1 constructs and VTL syntax. I wouldn't mind either if I had a strong business case for it :)

OperationalFallacy avatar Feb 21 '24 17:02 OperationalFallacy

Is this the appropriate place to piggyback and request Events API targets for EventBridge rules?

dylanirion avatar Mar 14 '25 11:03 dylanirion