-
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
feat(s3): onCloudTrailWriteObject matches all update events #4723
Conversation
In addition to 'PutObject', onCloudTrailPutObject() should also match on event names 'CopyObject' and 'CompleteMultipartUpload'; otherwise the event does not trigger when files are uploaded using those APIs. E.g., larger files are uploaded using the multipart API. fixes aws#4634
Thanks so much for taking the time to contribute to the AWS CDK ❤️ We will shortly assign someone to review this pull request and help get it
|
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
When the commit ends up affecting other integration tests like this one, should I go ahead and run |
removed unnecessary integration tests
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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.
I am not sure I am comfortable with paggybacking these two additional events on onCloudTrailPutObject
since the name of this method is very explicit. Maybe we can simply add an additional method onCloudTrailUploadObject
(or onCloudTrailWriteObject
) which has a more high-level name which will express this idea better, but will also allow people to use the more fine-grained ...PutObject
.
What do you think?
packages/@aws-cdk/aws-s3-notifications/test/notifications.test.ts
Outdated
Show resolved
Hide resolved
I think creating a new method makes sense from the semantic point of view and agree that the name could be confusing if piggybacked. I will create a new method As the issue was originally opened as a CodePipeline S3 source action issue, should I also update the |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Of course! |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Done! Thank you. It looks like master is changing faster than CodeBuild CI will run, so I'll leave that for you or merge it again when the changes slow down. |
Do we have in mind why would someone want to react on Should we at least deprecate |
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.
Perfect!
Thank you for contributing! Your pull request is now being automatically merged. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
thanks everyone |
In addition to
PutObject
,Bucket.onCloudTrailPutObject()
should alsomatch on event names
CopyObject
andCompleteMultipartUpload
;otherwise, the event does not trigger when files are uploaded using
those APIs. E.g., larger files are uploaded using the multipart API.
This fixes #4634
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license