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

AppSync EventAPI: DataSources #33458

Closed
2 tasks
luiscarlosjayk opened this issue Feb 14, 2025 · 3 comments
Closed
2 tasks

AppSync EventAPI: DataSources #33458

luiscarlosjayk opened this issue Feb 14, 2025 · 3 comments
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. needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. p3

Comments

@luiscarlosjayk
Copy link

Describe the feature

Same fashion that we can add DataSources like Lambda functions, EventBridge buses, and more, to AppSync GraphqlAPIs; think it would be really good if we could also attach data sources to AppSync EventAPIs.

And also attach an EventBridge bus as a publisher to a AppSync EventAPI, therefore we could send events from multiple services to clients via a bus.

Use Case

Feels like current AppSync EventAPI is incomplete to be an easy integration for serverless web-socket because didn't see a way in CDK to add a Lambda function or EventBridge bus as the data source of an AppSync EventAPI.

Proposed Solution

Having data sources for AppSync EventAPIs, same way we have for GraphqlAPIs.

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.2

Environment details (OS name and version, etc.)

mac

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

pahud commented Feb 15, 2025

As far as I can see from the doc, currently, CloudFormation does not support adding data sources (like Lambda functions or EventBridge buses) directly to AppSync EventAPIs.

While AppSync GraphQL APIs fully support various data sources (Lambda, DynamoDB, EventBridge, etc.) through the AWS::AppSync::DataSource resource, the EventAPI only supports basic configuration through EventConfig which includes:

  • Authorization configuration
  • Message publishing
  • Message subscriptions
  • Logging

Until this feature is supported by AWS CloudFormation (and consequently AWS CDK), you would need to use alternative approaches for implementing real-time event-driven architectures, such as:

  1. Using AppSync GraphQL API with subscriptions
  2. Using API Gateway WebSocket APIs with Lambda integrations
  3. Using direct WebSocket connections to your services

Please consider to create a feature request in https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues to increase the visibility for the cloudformation team. As long as we have CFN support from the upstream, CDK should be able to support that immediately.

@pahud pahud added needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. p2 p3 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. p2 labels Feb 15, 2025
@luiscarlosjayk
Copy link
Author

Hey @pahud,
thanks for the quick reply, I really appreciate.

I've done as you suggested and created a feature request to CloudFormation team here:
aws-cloudformation/cloudformation-coverage-roadmap#2262

Think that would be a phenomenal addition and empower even more AppSync EventAPIs.

Best regards,
LuisK

Copy link

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 Feb 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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. needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. p3
Projects
None yet
Development

No branches or pull requests

2 participants