Skip to content

Instantly share code, notes, and snippets.

@moonape1226
Last active February 24, 2023 15:01
Show Gist options
  • Select an option

  • Save moonape1226/a5cad88aa6564f18a024e6ac1a66adb1 to your computer and use it in GitHub Desktop.

Select an option

Save moonape1226/a5cad88aa6564f18a024e6ac1a66adb1 to your computer and use it in GitHub Desktop.

Revisions

  1. moonape1226 revised this gist Jan 11, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@
    "Service": "delivery.logs.amazonaws.com"
    },
    "Action": "s3:PutObject",
    "Resource": "arn:aws:s3:::bucket_name/prefix/AWSLogs/{$your_account_id}/*",
    "Resource": "arn:aws:s3:::${bucket_name}/prefix/AWSLogs/${your_account_id}/*",
    "Condition": {
    "StringEquals": {
    "s3:x-amz-acl": "bucket-owner-full-control"
    @@ -22,7 +22,7 @@
    "Service": "delivery.logs.amazonaws.com"
    },
    "Action": "s3:GetBucketAcl",
    "Resource": "arn:aws:s3:::{$bucket_name}"
    "Resource": "arn:aws:s3:::${bucket_name}"
    }
    ]
    }
  2. moonape1226 created this gist Jan 11, 2021.
    28 changes: 28 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    {
    "Version": "2012-10-17",
    "Statement": [
    {
    "Sid": "AWSLogDeliveryWrite",
    "Effect": "Allow",
    "Principal": {
    "Service": "delivery.logs.amazonaws.com"
    },
    "Action": "s3:PutObject",
    "Resource": "arn:aws:s3:::bucket_name/prefix/AWSLogs/{$your_account_id}/*",
    "Condition": {
    "StringEquals": {
    "s3:x-amz-acl": "bucket-owner-full-control"
    }
    }
    },
    {
    "Sid": "AWSLogDeliveryAclCheck",
    "Effect": "Allow",
    "Principal": {
    "Service": "delivery.logs.amazonaws.com"
    },
    "Action": "s3:GetBucketAcl",
    "Resource": "arn:aws:s3:::{$bucket_name}"
    }
    ]
    }