79132145

Date: 2024-10-28 05:35:30
Score: 2.5
Natty:
Report link

I'm trying to Centralize CloudTrail Log Files from Multiple Accounts but i kept getting error message when trying to create cloudtrail on my other accounts. [Incorrect S3 bucket policy is detected for bucket: central-bucket-for-data]. I need help with my json policy

{ "Version": "2012-10-17",

"Statement": [

    {
        "Sid": "AWSCloudTrailAclCheck20150319-522e0f7f-7eb8-415a-aeee-051f30084a60",
        "Effect": "Allow",
        "Principal": {
            "Service": "cloudtrail.amazonaws.com"
        },
        "Action": "s3:GetBucketAcl",
        "Resource": "arn:aws:s3:::central-bucket-for-data",
        "Condition": {
            "StringEquals": {
                "AWS:SourceArn": [
                    "arn:aws:cloudtrail:us-east-1:9------:trail/Central-logs-Trail",
                    "arn:aws:cloudtrail:us-east-1:7-------:trail/Central-logs-Trail"
                ]
            }
        }
    },
    {
        "Sid": "AWSCloudTrailWrite20150319-822559e9-159f-46cd-8113-385f2e3b50ba",
        "Effect": "Allow",
        "Principal": {
            "Service": "cloudtrail.amazonaws.com"
        },
        "Action": "s3:PutObject",
        "Resource": [
            "arn:aws:s3:::central/AWSLogs/9-----/*",
            "arn:aws:s3:::central/AWSLogs/7-----/*"
        ],
        "Condition": {
            "StringEquals": {
                    "AWS:SourceArn": [
                    "arn:aws:cloudtrail:us-east-1:9-------:trail/Central-logs-Trail",
                    "arn:aws:cloudtrail:us-east-1:7-------:trail/Central-logs-Trail"
                ],
                "s3:x-amz-acl": "bucket-owner-full-control"
            }
        }
    }
]

}

Reasons:
  • Blacklisted phrase (0.5): I need
  • Blacklisted phrase (2.5): I need help
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Olu Bello