The following resource(s) failed to create: [mcLoggingBucket].

0

I am trying to generate a Valheim game server using this guide: https://aws.amazon.com/blogs/gametech/hosting-your-own-dedicated-valheim-server-in-the-cloud/

However, when trying to create the Stack in CloudFormation, I get the below error:

"Bucket cannot have ACLs set with ObjectOwnership's BucketOwnerEnforced setting (Service: Amazon S3; Status Code: 400; Error Code: InvalidBucketAclWithObjectOwnership; Request ID: 51R10FQCBW6BCSC9; S3 Extended Request ID: p2+/TRD2zyg4WtFDht/oETooFwJkZkZm0MINYLPK+qQ9fw78R2un1E1araLGUym3cpGe023uUdg=; Proxy: null)"

Here is the code for that resource from the YAML file (@=a)

mcLoggingBucket:
    Type: AWS::S3::Bucket
    Properties: 
      BucketEncryption:
        ServerSideEncryptionConfiguration:
          - ServerSideEncryptionByDefault:
              SSEAlgorithm: 'aws:kms'
              KMSM@sterKeyID: KMS-KEY-ARN
      PublicAccessBlockConfiguration: 
        BlockPublicAcls: True
        BlockPublicPolicy: True
        IgnorePublicAcls: True
        RestrictPublicBuckets: True
      AccessControl: LogDeliveryWrite

已提問 1 年前檢視次數 1506 次
1 個回答
1
已接受的答案

This error is related to the bucket being recognized as a “Bucket Owner Enforced” bucket during creation. ACLs such as “LogDeliveryWrite” are not able to be enabled when a bucket is in this state. This template can only work on buckets with ObjectWriter or BucketOwnerPreffered object ownership currently.

You can consider using the below options

1.Edit the template to specify a new object ownership rule

2.Remove the “LogDeliveryWrite” line and allow S3 to handle this itself via bucket policy.

=== Template ObjectOwnership: ObjectWriter (also tested) | ObjectOwnership: BucketOwnerEnforced (Returns the same error)- ===

  OwnershipControls:
    Rules:
      - ObjectOwnership: BucketOwnerPreferred

Add this section to your template and that should resolve your issue

AWS
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南