Publish error with S3

Solved
nerdingio

Oct 7th, 2024 02:00 PM

When I publish with S3 I get a fail whale.

I've tested my connections and it's saying successful..

Any ideas on what to test or debug?

bobbyiliev

Oct 8th, 2024 03:27 AM

Hey!

I just checked the logs and as far as I can see you used a non-existing bucket:

<Error><Code>NoSuchBucket</Code><Message>
The specified bucket does not exist</Mes (truncated...) NoSuchBucket (client): The specified bucket does not exist 

You need to make sure that you:

  • Specify the correct credentials
  • Specify the correct bucket name, including any case sensitive values
  • Make sure that you also specify the correct region

Let me know how it goes.

nerdingio

Oct 8th, 2024 04:08 AM

Hey so I thought it was fixed. Definitely had some user error.

However now I don't get a fail whale but I dont see any objects in my bucket.

bobbyiliev

Oct 8th, 2024 05:40 AM

This is quite strange. I don't see any errors in the logs this time.

Can you please confirm what region is your bucket created in?

bobbyiliev

Oct 8th, 2024 08:39 AM

Best Answer

I managed to reproduce that problem and to fix it I had to:

  • Make sure that the S3 bucket has its bucket ownership set to ACLs enabled:
  • Make sure that your S3 bucket has the Block all public access set to Off:

Let me know how it goes after that!

nerdingio

Oct 8th, 2024 09:10 AM

VICTORY!!! Thanks Bobby!

Report
1
bobbyiliev

Oct 8th, 2024 09:56 AM

Awesome! No problem at all! Thanks for reporting those issues, I have a PR ready to make some improvements to the error messages!

Feel free to post new questions in case anything else pops up!

chrisd

Oct 12th, 2024 02:37 AM

I just learned how to use Laravel with S3 and what helped me was the AWS CLI

Using the CLI I could make sure I had all my credentials and permissions working before doing Laravel stuff as the API responses are sometimes crap/confusing, or just non explanatory.

Report
1
bobbyiliev

Oct 12th, 2024 05:05 AM

That is a great tip! Thank you for sharing it Chris!