Skip to content

Conversation

kwwendt
Copy link
Contributor

@kwwendt kwwendt commented Apr 24, 2025

Issue # (if applicable)

Closes #34264

Reason for this change

This change is to support the release of data source integrations for AWS AppSync Events. The implementation is almost an exact replica of the existing data sources for AppSync GraphQL APIs.

Description of changes

  • New data-source-common.ts file which contains the data source implementation. This new file was needed given the previous data-source.ts implementation only works for the IGraphqlApi Interface. The common implementation makes it to the new generic IApi type is used.
  • Changes to eventapi.ts to support adding data sources to the API.
  • Changes to channel-namespace.ts to support adding event handler configuration with the data sources configured for the API.
  • New unit tests to validate functionality for data sources.
  • New integration tests to validate end-to-end functionality across all data source types and the different configurations for the Lambda data source type including direct Lambda invoke and sync/async invoke type.

Describe any new or updated permissions being added

There are no new permissions being added. The data source implementation was a copy/paste from the GraphQL implementation and the grant methods used in those have not changed in this implementation.

Description of how you validated changes

  • New unit tests to validate functionality for data sources.
  • New integration tests to validate end-to-end functionality across all data source types and the different configurations for the Lambda data source type including direct Lambda invoke and sync/async invoke type.
  • integ.appsync-eventapi-dynamodb.ts
  • integ.appsync-eventapi-eventbridge.ts
  • integ.appsync-eventapi-http.ts
  • integ.appsync-eventapi-lambda-direct-async.ts
  • integ.appsync-eventapi-lambda-direct.ts
  • integ.appsync-eventapi-lambda.ts
  • integ.appsync-eventapi-opensearch.ts
  • integ.appsync-eventapi-rds.ts

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team April 24, 2025 21:26
@github-actions github-actions bot added p2 beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK labels Apr 24, 2025
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Apr 25, 2025
@garysassano
Copy link
Contributor

I just wanted to note that I have an open issue for this PR (#34264) in case you want to update the original message. Also, the Bedrock data source is missing, as it's currently absent from GraphqlApi as well (see #34265).

@github-actions github-actions bot added effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. labels Apr 28, 2025
@kwwendt
Copy link
Contributor Author

kwwendt commented Apr 28, 2025

Hi @garysassano - thanks for your comment. I've updated the PR comment to include your issue number for tracking.

The Bedrock data source is something we can explore in a separate PR. I had reviewed it for this one but there are some gaps currently into the Bedrock module like short-hand syntax for cross-region inference profiles. The Bedrock data source in AppSync for both GraphQL and EventAPI is very simple - it's the type as AMAZON_BEDROCK_RUNTIME and the serviceRole filled in granting AppSync access to invoke the specific models.

Once this PR is merged and approved, I can start working on the other one for the bedrock method for both GraphQL and Event APIs.

@paulhcsun paulhcsun self-assigned this Apr 28, 2025
@paulhcsun
Copy link
Contributor

@Mergifyio update

Copy link
Contributor

mergify bot commented Apr 29, 2025

update

✅ Branch has been successfully updated

Copy link
Contributor

mergify bot commented Apr 29, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 1970752
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 2fac64e into aws:main Apr 29, 2025
14 of 15 checks passed
Copy link
Contributor

mergify bot commented Apr 29, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

Copy link
Contributor

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 Apr 29, 2025
@kwwendt kwwendt deleted the appsync-events-data-sources branch April 29, 2025 19:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(aws-appsync): Add data source integrations to EventApi

4 participants