feat(events-targets): add support for AppSync as an EventBridge rule target #29584
feat(events-targets): add support for AppSync as an EventBridge rule target #29584mergify[bot] merged 35 commits intoaws:mainfrom
Conversation
lpizzinidev
left a comment
There was a problem hiding this comment.
Thanks 👍
Left some suggestions for minor adjustments
| if (this.props.deadLetterQueue) { | ||
| addToDeadLetterQueueResourcePolicy(rule, this.props.deadLetterQueue); | ||
| } | ||
|
|
There was a problem hiding this comment.
From docs:
EventBridge supports AWS AppSync public GraphQL APIs. EventBridge does not currently support AWS AppSync Private APIs.
Shouldn't we validate visibility: 'GLOBAL' as well?
| const role = this.props.eventRole || singletonEventRole(this.appsyncApi); | ||
|
|
||
| // if a role was not provided, attach a permission | ||
| if (!this.props.eventRole) { |
There was a problem hiding this comment.
| if (!this.props.eventRole) { | |
| if (!this.props.eventRole && this.props.mutationFields.length) { |
Should we grant permissions if there are no mutationFields?
Also, is it ok to assume that the provided eventRole will always have the necessary permissions?
There was a problem hiding this comment.
removed mutationFields, developer needs to provide the proper permissions if they specify the role directly. If eventRole is provided by customer, there's no check.
There was a problem hiding this comment.
developer needs to provide the proper permissions if they specify the role directly
Can you please add it to the README with an example?
| /** | ||
| * The variables that are include in the GraphQL operation. | ||
| */ | ||
| readonly variables: events.RuleTargetInput; |
There was a problem hiding this comment.
| readonly variables: events.RuleTargetInput; | |
| readonly variables?: events.RuleTargetInput; |
Can we expect GraphQL queries without variables?
There was a problem hiding this comment.
changed to optional
| // GIVEN | ||
| let stack: cdk.Stack; |
There was a problem hiding this comment.
| // GIVEN | |
| let stack: cdk.Stack; | |
| describe('AppSync GraphQL API target', () => { | |
| let stack: cdk.Stack; | |
| ... |
Let's wrap it in a describe to keep it more organized.
Also, can you please remove the commented dead-code in the file?
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
Co-authored-by: Luca Pizzini <lpizzini7@gmail.com>
|
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). |
|
@Mergifyio update |
❌ Mergify doesn't have permission to updateDetailsFor security reasons, Mergify can't update this pull request. Try updating locally. |
|
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 CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
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). |
|
@Mergifyio queue |
🛑 The pull request has been removed from the queue
|
|
@Mergifyio refresh |
✅ Pull request refreshed |
Reason for this change
Introduces support to configure AppSync GraphQLAPI as an EventBridge target.
Description of changes
GraphQLEndpointArnattribute in L2 GraphQLAPI constructevents.IRuleTargetforAppSyncDescription of how you validated changes
unit test and integration tests
Issue
Solves #29884
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license