UnityWebRequest.Put to AWS S3

I’m using the documentation shown in the link below to try and put some data into a .txt file I’ve got on my AWS S3 account:

However, I get an error message saying “HTTP/1.1 403 Forbidden”.

So obviously I don’t have the permissions set up properly, or I need to request them in Unity.

Does anyone know how to achieve this or point me in the direction of the documentation please?

So obviously I don’t have the permissions set up properly.

Yes, you probably need some sort of authentication on your server. 403 is an HTTP response code from your server. An error starting with 4xx indicates a client error. So the request is invalid. We can’t tell you want kind of authentication you need and we also don’t know what you’re currently doing already. So how are we supposed to help you?

I never really used AWS servers. So have you checked the corresponding documentation? Maybe this ? As you can see they included an Authorization header. What it should contain should be explained elsewhere.

@DJgray3D I had something similar, couldnt find how make it thru unitywebrequest - same 403 Forbidden.
If you are targeting webgl, then you might use aws js sdk and AWS.S3.ManagedUpload :

What worked in my case was to prepare jslib function to setup S3 client poviding bucket, file path and byte with the file content:
var upload = new AWS.S3.ManagedUpload({
params: {
Bucket: YourBucketName,
Key: FilePath,
Body: bytes

before calling the above, i am setting up the S3 client with AWS.config.update , setting up region and credentials object (using Logins - using jwt token and IdentityPoolID)

hope this helps