I followed Tutorial: Using an Amazon S3 trigger to create thumbnail images - AWS Lambda to create a thumbnail for my images.
However, when I try to access the images in bucket-resized I get an Access Denied
.
CodePudding user response:
That tutorial does not create 'public' objects.
If you want the resized objects to be public, you would either need to:
- Create a Bucket Policy on the 'resized' bucket that grants
s3:GetObject
access for the bucket (see Bucket policy examples - Granting read-only permission to an anonymous user), OR - When uploading the object, use
ACL='public-read'
, which will make the individual objects public
To make the bucket or objects public, you will also need to disable S3 Block Public Access on the bucket.
CodePudding user response:
- check if the thumbnail is generated successfully
- check your bucket has public accessibility enabled
- check if the generated file thumbnail has public read permission