-
Notifications
You must be signed in to change notification settings - Fork 4k
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
fix(events): now EventBus.grantPutEventsTo correctly handles service principals #33729
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull request linter fails with the following errors:
❌ Fixes must contain a change to an integration test file and the resulting snapshot.
If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed, add Clarification Request
to a comment.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #33729 +/- ##
=======================================
Coverage ? 82.37%
=======================================
Files ? 120
Lines ? 6933
Branches ? 1169
=======================================
Hits ? 5711
Misses ? 1119
Partials ? 103
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Issue #22080
Closes #22080.
Reason for this change
When trying to grant PutEvents permissions to an AWS Service Principal using
grantPutEventsTo
, the method performed a no-op without any warnings or errors. This prevented users from properly granting permissions to service principals, even though this is a valid use case that can be done through the AWS Console. The change implements the correct behavior by creating an EventBusPolicy when dealing with service principals.Description of changes
EventBus.grantPutEventsTo
methodiam.Grant.drop()
for service principals to indicate permissions are handled via EventBusPolicyDescribe any new or updated permissions being added
The change introduces the creation of EventBusPolicy resources with
events:PutEvents
permission when granting access to service principals. This is not a new permission, but rather a different way of granting the same permission through resource-based policies instead of identity-based policies.Description of how you validated changes
Added new test cases that verify:
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license