CloudTrail Trail with Prefix doesn't set correct bucket policy #6741
Labels
@aws-cdk/aws-cloudtrail
Related to AWS CloudTrail
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
good first issue
Related to contributions. See CONTRIBUTING.md
in-progress
This issue is being actively worked on.
p2
When creating a CloudTrail trail via the Trail construct, adding an
s3KeyPrefix
will result in CloudFormation failing withError Code: InsufficientS3BucketPolicyException
.Reproduction Steps
Add this to a stack:
then
cdk deploy
.Error Log
Environment
Other
The snippet above will create a CloudFormation template with this policy:
The policy doesn't include the prefix in the resource statements.
This is confirmed in the source code where there is no mention of
props.s3KeyPrefix
:When created via the console, a trail with a prefix results in a policy like:
Thank you.
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: