1
Merci d'avance!CloudFormation CloudTrail S3 Policy Error - Une stratégie de compartiment S3 incorrecte est détectée pour le compartiment
Je suis coincé sur ce week-end .. Je tente de créer un service de cloudtrail en CloudFormation mais recevoir cette erreur lorsque ran - politique incorrecte seau S3 est détecté pour seau: s3bucket-xxxxxx
Voici mon code;
"s3bucket-xxxxxx": {
"Type": "AWS::S3::Bucket",
"Properties": {
"AccessControl": "Private",
"VersioningConfiguration": {
"Status": "Suspended"
}
},
"Metadata": {
"AWS::CloudFormation::Designer": {
"id": "XXXX"
}
}
},
"s3policytraillogs": {
"Type": "AWS::S3::BucketPolicy",
"Properties": {
"Bucket": {
"Ref": "s3bucket-xxxxxx"
},
"PolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AWSCloudTrailAclCheck20150319",
"Effect": "Allow",
"Principal": {
"Service": "cloudtrail.amazonaws.com"
},
"Action": "s3:GetBucketAcl",
"Resource": "arn:aws:s3:::s3bucket-xxxxxx"
},
{
"Sid": "AWSCloudTrailWrite20150319",
"Effect": "Allow",
"Principal": {
"Service": "cloudtrail.amazonaws.com"
},
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::s3bucket-xxxxxx/AWSLogs/XXXXXXXX/*",
"Condition": {
"StringEquals": {
"s3:x-amz-acl": "bucket-owner-full-control"
}
}
}
]
}
},
"Metadata": {
"AWS::CloudFormation::Designer": {
"id": "XXXX"
}
}
},
"trailtraillogs": {
"Type": "AWS::CloudTrail::Trail",
"Properties": {
"IncludeGlobalServiceEvents": true,
"IsLogging": "true",
"S3BucketName": {
"Ref": "s3bucket-xxxxxx"
}
},
"Metadata": {
"AWS::CloudFormation::Designer": {
"id": "XXXX"
}
}
}
Quel est le but recherché de ' « VersioningConfiguration »: { « Status »: « Suspendu » } '? Il semble qu'il devrait être plutôt impossible de créer un seau avec le versioning suspendu. –
Hey Michael merci de me répondre, c'est juste quelque chose que Cloudformer a généré, cela aurait-il besoin d'être une valeur différente? –
Je travaillais seulement sur l'intuition, là. Le versionnement sur un compartiment ne peut être suspendu qu'après sa première activation - je pense. Mais en fait, l'erreur concerne la politique, alors je vous ai peut-être mal orienté. J'examinerai plus attentivement la section sur la politique. –