JayVDiyk
JayVDiyk

Reputation: 4487

Users Unable to Access S3 Image

Originally I have:

a Bucket (Singapore) , and then I copied this bucket to another region using the AWS CLI.

But the problem is that the resulted images in the new bucket is not accessible via web.

Any thoughts? enter image description here p.s: I had never set any policy to both buckets before.

Upvotes: 1

Views: 1240

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 270184

By default, all content in an Amazon S3 bucket is private.

You can grant access to Amazon S3 objects in several ways:

  • Object-level ACLs: You can make individual files public by ticking the Read permission in the S3 console. This applies only to the specific file.
  • Bucket Policy: This is applied to the bucket, which assigns permissions to the whole bucket or paths within the bucket. For example, make all objects public. (See Example bucket policies)
  • IAM Policy: You can create a policy and apply it to a specific IAM User or IAM Group. The policy can grant access to specific buckets or paths within buckets, similar to the Bucket Policy.
  • Pre-Signed URLs: These can be generated by applications to grant time-limited access to objects stored in Amazon S3.

So, if you think that your users should able to access the files in your bucket, make sure you have granted access via one of the above methods.

Upvotes: 3

Related Questions