leejo / AWS-S3

Lightweight interface to Amazon S3 (Simple Storage Service)
5 stars 6 forks source link

no-sign-request error on auth #16

Open markov2 opened 3 years ago

markov2 commented 3 years ago

Hi,

I try to implement this:

aws --no-sign-request s3 ls s3://commoncrawl/crawl-data/CC-MAIN-2021

It is a public AWS data-set, so no authentication. I try to work around that issue, but end-up on the front-page of AWS. My script is

#!/usr/bin/env perl

use AWS::S3;

{ no warnings;
  use AWS::S3::Signer;
  sub AWS::S3::Signer::auth_header { '' }
}

my $cc = AWS::S3->new;
my $data = $cc->bucket('commoncrawl/crawl-data');

my $ls = $data->files(page_size => 100, page_number => 1);
while(my @files = $ls->next_page)
{   print "Page number: ", $ls->page_number, "\n";
    print "  ", $file->key, "\n";
}

Any idea?

leejo commented 3 years ago

@markov2 - no clue. I'd up some debugging to try to figure out what AWS don't like about the request perhaps.