sagidM / s3-resizer

AWS Lambda for resizing images in S3 on fly.
MIT License
224 stars 78 forks source link

"Access Denied" in the brower #13

Closed hugjchina closed 3 years ago

hugjchina commented 4 years ago

I can test successful in Lambda , but I test in my chrome brower and the system return "Access Denied". Could help me? Thanks !!

AccessDenied Access Denied E6BC853F822F087E 0W84WFaXXRCdQnZa1DWRSzQc0/LRijPbqjqSKf4tejzoXHmwF1nq9c42yWfXJa10i6CWmpBaO88=
hugjchina commented 4 years ago

I resolved the "Access Denied" , the next problem is NoSuchKey

The specified key does not exist. 750x750/force.png

How can I do ?

sagidM commented 4 years ago

@hugjchina to the best of my understanding, when you do a request to 750x750/force.png, the image is being processed so that you have a directory named 750x750 with an image force.png in your bucket. However, your browser tells you NoSuckKey. And at this point, if you do a request in an incognito mode (CTRL+SHIFT+N in Chrome, CTRL+SHIFT+P in Firefox), you will see the image.

Is everything correct?

bynelus commented 4 years ago

@hugjchina How did you resolve the Access Denied problem? I'm having the same issue, but can't figure out how to solve it.

bynelus commented 4 years ago

@sagidM Do you have an idea why I get access denied? I've followed every step, but I think I need to do some policy changes somewhere. This is what I get when testing the Lambda function:

{
  "statusCode": 403,
  "body": "Exception: Access Denied",
  "headers": {
    "Content-Type": "text/plain"
  }
}
sagidM commented 4 years ago

@bynelus does Access Denied appear on the image put anywhere or just when it is in a nested directory? Any chance it might be a duplicate of https://github.com/sagidM/s3-resizer/issues/9?