Does anyone know how to use the S3 Connector?

Does anyone know where I can find updated instructions on the S3 connector? I've attempted the docs and added my provider, but I can't do anything else. The docs say to right-click on the provider to add an action, and the context menu does come up, but when I click on something like "List Buckets," nothing happens. If I add an API action and do it that way, the output is a 404 error. Specifically, "{"status":"404","message":"/api/AWS/list%20buckets not found."}" How do I access my buckets once I add the provider?

The S3 docs are outdated and from before globals. What you should do is open the workflows tab (where you have your server actions) and open the "Globals" dropdown. Right click on s3 storage and then "Add S3 provider". You can then enter your S3 connection info there.
image

Then, on any server action, you can use any of the actions under the "S3 Connector" tab. You do not need (/no longer need to) add a S3 connector to each server action, as you would have defined it under the global actions.

Thank you for this! I apologize for not being more clear but I had already added my S3 connection in globals. I’m asking about what happens after i do that. I can’t seem to access my buckets. I added an API action to list my buckets but I got a 404 error. Same thing with trying to list files. Choosing Add a Bucket or Delete a Bucket does nothing. None of the S3 connector actions work for me. How do I get access to my buckets after I’ve added the provider? If there is something wrong with my connection, how do i tell and how do i fix it? I used the access and secret keys provided by AWS and the region is correct. I don’t understand what’s happening or how I can fix it.

Hm, okay, that's really weird then. I'm using it in my project the way I described, and it seems to work fine. Could it be your S3 credentials are incorrect?

I'm using Cloudflare R2 rather than AWS, so I'm not sure if it requires any specific configuration on their side to make it work as well.

@TheForce, could you share a screen shot of your server action? I see you shared the global action, but the server action being called would be beneficial.

Try taking the space out of the API action name as spaces often cause problems

So, here is my global action:

And here is my server action:

@Digo I'm using the keys I created in AWS. I just copied and pasted. I don't know what other credentials I would use.

@Hyperbytes How do I take the space out of the API action? I'm just using the option provided by Wappler.

I'm getting the same 404 error with both the List Buckets action and the List Files action. In addition, the none of the other actions work for me either.

You have named your api action "list buckets" with a space, rename it to remove the space. The space is what is causing the 404 error

Oh my goodness! I didn't even see that I did that! Thank you so much!

1 Like

Removing the space was my first thought as well, just wanted to confirm there was a space in the name by looking at the server action itself. I believe it should work without the space in the name.

Seems that we really have to add more automatic sanitation of the names of the server connect actions and webhooks to avoid such errors.

So like always convert spaces to underscore and make lowercase.

1 Like

Perfect! That just saved me doing a feature request. This catches a lot of people out

Also look at the default filename when creating a new API action as this defaults to "New File" with a space

Fixed in Wappler 6.7.3

This topic was automatically closed after 36 hours. New replies are no longer allowed.