Reputation: 1516
I have two AWS accounts. Each account has an S3 bucket and CloudFront which exposes the contents of the S3 bucket.
I would like to get rid of a CORS issue. For that I I need to serve all content using one CloudFront.
How I can grant permissions to the S3 bucket from account2 to CloudFront in account1?
Upvotes: 2
Views: 2857
Reputation: 4451
This is possible if the bucket is publicly accessible , the bucket won't come in the drop down when you're creating origin but you can use the name as bucket.s3.region.amazonaws.com.
It is also possible using origin access identity. Use first your own bucket to create the bucket policy automatically by CloudFront, you should be able to see IAM identity in CloudTrail, you can copy the same policy on the other account S3 bucket and OAI should work.
Upvotes: 1