Amazon s3 bucket image access issue: Access Denied

876 Views Asked by At

I am getting the following error on putting the image src

enter image description here

I am using following modules to upload an image in node

aws = require('aws-sdk'),
multer = require('multer'),
multerS3 = require('multer-s3'),

Image is uploading successfully in the bucket but when I put the same url in <img src="https://meditationimg.s3.us-east-2.amazonaws.com/profilepic/1507187706799Penguins.jpg" /> it returns the above error

Anyone who knows the solution??

1

There are 1 best solutions below

0
On

No Such Key is S3's way of saying "404 Not Found."

The request was authorized and syntactically valid, but there's no file in the bucket at the specified path.

You may want to inspect the contents of your bucket from the AWS console.

Make sure you access image using the same case as it was uploaded and is stored on S3.(Generally it should be lower case.)