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

posta un anno fa1505 visualizzazioni
1 Risposta
1
Risposta accettata

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
con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande