Access denied when trying to GET objects uploaded to s3 bucket via aws sdk using cloudfront
Using client-s3 sdk signed URLs, i was able to PUT and DELETE objects in my s3 bucket. But when trying to access those same objects using a GET request via cloudfront, s3 denies me access (Access Denied) to the objects. On the permissions section of the bucket, i set the bucket policy to allow GET requests from my cloudfront distribution. I know it works because when i upload objects via the s3 console, i can use cloudfront signed URLs to GET the objects from s3, that works. But once i programmatically use the client-s3 to upload the object, i am unable to GET it using my cloudfront distribution
can you share your bucket policy and make sure that the OIA for cloudfront is configured? Another thing, is make sure about the configuration of the bucket and that you're not using WEB enabled bucket if using OIA, OIA only works with REST requests.
Could it be the ACL for the objects in the bucket? For example, was the
--acl bucket-owner-full-control
ACLs are disabled for my bucket. I am using bucket policies alone to access objects in the bucket
Relevant questions
Virtual hosting an S3 bucket using Cloudfront + SSL
asked 3 years agoAccess denied when trying to GET objects uploaded to s3 bucket via aws sdk using cloudfront
Accepted Answerasked 7 months agoAccess denied when trying to GET objects uploaded to s3 bucket via aws sdk using cloudfront
Accepted Answerasked 7 months agoTrying to access s3 bucket using postman app and fix AccessDenied error
asked 3 months agogrant access to one role in another account to all objects in an S3 bucket?
asked 10 months agoUsing JavaScript and AWS SDK to access S3 Bucket without Credentials
asked 2 years agoCross Account Copy S3 Objects From Account B to AWS KMS-encrypted bucket in Account A
asked 5 months agoAccess denied when trying to GET objects uploaded to s3 bucket via aws sdk using cloudfront
asked 7 months agoAWS Cloudfront - InvalidKey Unknown Key - only when using signed URLs
asked 3 years agoAccess denied error uploading to s3 bucket
asked 6 days ago
Duplicate Question to this https://repost.aws/questions/QUtHyfwozYTrq3_5QxXU7Afg/access-denied-when-trying-to-get-objects-uploaded-to-s-3-bucket-via-aws-sdk-using-cloudfront