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

chore(appsync): improve error message for missing iam authorization mode #33501

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

garysassano
Copy link

Issue # (if applicable)

Closes #33465

Reason for this change

The error message when using grant methods like grantPublish() and grantSubscribe() on an Event API without IAM authorization mode needs improvement. Currently, users get a confusing error without clear guidance on how to fix it.

The error should clearly explain:

  1. Why the operation failed (you tried to use a grant method on an Event API with missing IAM authorization mode)
  2. How to fix it (add IAM authorization mode to the auth providers list)

Description of changes

Rephrased the error message.

Describe any new or updated permissions being added

Description of how you validated changes

Checklist


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

@github-actions github-actions bot added bug This issue is a bug. effort/medium Medium work item – several days of effort p2 beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK labels Feb 19, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team February 19, 2025 03:14
@gshpychka
Copy link
Contributor

Seems like the PR includes a lot of formatting changes, which are not compatible with the linting setup in the repo.

@garysassano garysassano force-pushed the fix-msg branch 2 times, most recently from 1c05580 to c8ee4db Compare February 20, 2025 01:13
@gshpychka
Copy link
Contributor

You will need to change this test as well: https://github.com/garysassano/aws-cdk/blob/8b20e712a35ae7b5150bbfabfc94246ae4307745/packages/aws-cdk-lib/aws-appsync/test/appsync-eventapi.test.ts#L364

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@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 Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. effort/medium Medium work item – several days of effort 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: EventApi forces you to include IAM Authorization mode
3 participants