You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(appsync): add support for data source integrations (#34248)
### 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
- [X] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy file name to clipboardExpand all lines: packages/@aws-cdk-testing/framework-integ/test/aws-appsync/test/integ-assets/eventapi-grant-assertion/index.js
+23-16
Original file line number
Diff line number
Diff line change
@@ -225,10 +225,12 @@ async function getPublishAuthHeader(authMode, event={}, authToken='') {
225
225
* @param {string} authMode the authorization mode for the request
226
226
* @param {string} authToken the token used for Lambda auth mode
227
227
* @param {boolean} triggerPub whether to also publish in the method
228
+
* @param {array} eventPayload the payload to publish
0 commit comments