Open SantiRaposo opened 1 year ago
Currently, the S3 triggers that CDK Pipelines support are described here: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codepipeline_actions.S3Trigger.html
However, a simpler way to enable eventbridge notifications for an S3 bucket exists as a bucket level setting: https://docs.aws.amazon.com/AmazonS3/latest/userguide/EventBridge.html
However when using S3Trigger.EVENTS the generated event pattern is:
S3Trigger.EVENTS
{ "detail-type": ["AWS API Call via CloudTrail"], "source": ["aws.s3"], "detail": { "requestParameters": { "bucketName": ["<bucket-name>"], "key": ["<buckt-key>"] }, "resources": { "ARN": ["<object-arn>"] }, "eventName": ["CompleteMultipartUpload", "CopyObject", "PutObject"] } }
Which does not match with the event generated by the S3 integration.
Allow using event-triggered pipes (which AWS recommends https://docs.aws.amazon.com/codepipeline/latest/userguide/update-change-detection.html#update-change-detection-S3-event) without having to provision a CloudTrail trail.
Another enum value that generates an event pattern similar to the following:
{ "source": [ "aws.s3" ], "detailType": [ "Object Created", "Object Restore Completed" ], "detail": { "bucket": { "name": "<bucket-name>" }, "object": { "key": "<object-key>" } } }
No response
2.93.0
macOS 13.5.1
Makes sense for me. And this is the recommended configuration according to the document.
same here - please prioritise :)
Describe the feature
Currently, the S3 triggers that CDK Pipelines support are described here: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codepipeline_actions.S3Trigger.html
However, a simpler way to enable eventbridge notifications for an S3 bucket exists as a bucket level setting: https://docs.aws.amazon.com/AmazonS3/latest/userguide/EventBridge.html
However when using
S3Trigger.EVENTS
the generated event pattern is:Which does not match with the event generated by the S3 integration.
Use Case
Allow using event-triggered pipes (which AWS recommends https://docs.aws.amazon.com/codepipeline/latest/userguide/update-change-detection.html#update-change-detection-S3-event) without having to provision a CloudTrail trail.
Proposed Solution
Another enum value that generates an event pattern similar to the following:
Other Information
No response
Acknowledgements
CDK version used
2.93.0
Environment details (OS name and version, etc.)
macOS 13.5.1