Skip to content

Instantly share code, notes, and snippets.

@ilyesAj
Created August 19, 2022 14:45
Show Gist options
  • Select an option

  • Save ilyesAj/b9d909cba8ed578de9aaedd7d4f6119a to your computer and use it in GitHub Desktop.

Select an option

Save ilyesAj/b9d909cba8ed578de9aaedd7d4f6119a to your computer and use it in GitHub Desktop.

Revisions

  1. ilyesAj created this gist Aug 19, 2022.
    20 changes: 20 additions & 0 deletions bucket-B-policy.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    {
    "Version": "2012-10-17",
    "Statement": [
    {
    "Effect": "Allow",
    "Principal": {
    "AWS": "arn:aws:iam::Account-B:user/s3-cross-account"
    },
    "Action": [
    "s3:GetObject",
    "s3:PutObject",
    "s3:RestoreObject"
    ],
    "Resource": [
    "arn:aws:s3:::bucket-B",
    "arn:aws:s3:::bucket-B/*"
    ]
    }
    ]
    }