I’ve successfully implemented an Amazon Web Service S3 storage app using the Swift soto package.

I create the

service object like this:

func s3Maker() -> S3
    return S3(client: client, region: Region(rawValue: awsConfiguration.region), endpoint: awsConfiguration.endpoint, timeout: commandTimeout)

When using AWS, the

is one of AWS’s standard region names (in this case,
) and
(which tells soto use the standard "amazonaws.com" domain).

Everything works great.

I now want to reuse this code to communicate with non-AWS providers (starting with BackBlaze) that emulates the AWS S3 API. My understanding is that you simply change the endpoint and region during the service object creation.

I have a subclass of the

object that simply has different
) and
) property values, but it doesn’t work.

When the code runs it fails get the list of objects in the bucket, returning the error: "unable to read bucket contents"

In an attempt to debug this, I ran Fiddler Everywhere to monitor the HTTP requests being sent from my machine. When I run the AWS version, I see two HTTPS requests:

, both of which are successful.

But when I change the region and endpoints to BackBlaze, the code does nothing. Soto never sends any HTTP requests. The code just returns the error.

Has anyone every run into this, know how to debug it, or know the secret of getting soto to talk to a non-AWS service?

Anonymous Asked question May 14, 2021