anthony
anthony

Reputation: 293

S3 bucketpolicy and EMR - example

I can not find example of S3 BucketPolicy that allows only EMR to read data from it. EMR would be in the same account as S3. Anyone has any example to share?

Upvotes: 1

Views: 889

Answers (1)

SnigJi
SnigJi

Reputation: 1410

I guess this will work.

{
  "Id": "Policy1590853624822",
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Stmt1590853616750",
      "Action": "s3:*",
      "Effect": "Allow",
      "Resource": [
        "arn:aws:s3:::my-bucket",
        "arn:aws:s3:::my-bucket/*"
      ],
      "Principal": {
        "AWS": [
          "arn:aws:elasticmapreduce:us-east-1:1234567890:cluster/*"
        ]
      }
    }
  ]
}

You can create your own policies here in aws policy generator

Upvotes: 1

Related Questions