bduggan / aws-s3-raku

Raku client for AWS S3
6 stars 2 forks source link

Private S3 Compatible Services #10

Closed kawaii closed 3 years ago

kawaii commented 3 years ago

Hi, how can I construct an \s3 object which talks to other software speaking the S3 protocol? In my instance a MiniIO server running locally. I tried passing in $url to the constructor but looks like this isn't possible at the moment.

my $url = 'http://127.0.0.1:9000';
my \s3 = S3.new(:$secret-access-key, :$access-key-id, :$url, :$region);
kawaii commented 3 years ago

I found the $.aws-host variable which is now giving me the following output. Switching between my $aws-host = '127.0.0.1:9000'; and my $aws-host = 'http://127.0.0.1:9000';. :thinking:

$ raku t/s3-bucket-stuff.raku
Cannot look up attributes in a OpenSSL type object

$ raku t/s3-bucket-stuff.raku
err code: 336130315
error:1408F10B:SSL routines:ssl3_get_record:wrong version number
Internal Error: 'server returned no data'```
bduggan commented 3 years ago

Setting $aws-host = '127.0.0.1:9000' should work except that the scheme is currently fixed to be https rather than http. I can make a change to allow scheme to be set to http (and just default to https).

bduggan commented 3 years ago

Changed -- using scheme => 'http' should work now.