Uploaded files are not shown in S3 Bucket #108
-
Hi Guys, I'm trying to upload the files to the S3 bucket using the below code. Code is running successfully and shows no errors, but when the file never gets uploaded to the bucket.
I tried this locally on my dev machine and the file uploaded without any issues. So there is some problem with the serverless config only. I'm using the below-mentioned versions - laravel/framework - v9.52.5 Note - I had read somewhere that Lambda returns the response before it is finished uploading the file, not sure this is the case here. Let me know if you need more information. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Can you show your serverless.yml? How have you configured your |
Beta Was this translation helpful? Give feedback.
-
To configure the S3 filesystem, I simply added the credentials in the.env file and used the disk as S3 in the sample code provided in my question. Please find the serverless.yml code below - |
Beta Was this translation helpful? Give feedback.
-
Could it be that the filesystem disk does not throw exceptions by default: https://laravel.com/docs/10.x/filesystem#failed-writes I'm suspecting the credentials deployed in I'd recommend enabling |
Beta Was this translation helpful? Give feedback.
Could it be that the filesystem disk does not throw exceptions by default: https://laravel.com/docs/10.x/filesystem#failed-writes
I'm suspecting the credentials deployed in
.env
might not actually have the right permissions (or my not even be used by the app).I'd recommend enabling
throw
, and not deploying custom credentials in.env
but instead setting permissions on the function directly: https://www.serverless.com/framework/docs/providers/aws/guide/iam