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

질문됨 일 년 전1507회 조회
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
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠