Thursday, 20 September 2018

aws permission code

{
 "Version": "2008-10-17",
 "Statement": [
  {
   "Sid": "AllowPublicRead",
   "Effect": "Allow",
   "Principal": {
    "AWS": "*"
   },
   "Action": "s3:GetObject",
   "Resource": "arn:aws:s3:::MYBUCKETNAME/*"
  }
 ]
}


{
  "Version":"2008-10-17",
  "Statement":[{
        "Sid":"Allow Public Access to All Objects",
         "Effect":"Allow",
           "Principal": {
             "AWS": "*"
          },
       "Action":["s3:GetObject"],
       "Resource":["arn:aws:s3:::example.com/*"
      ]
    }
  ]
}

No comments:

Post a Comment