AWS-S3
view release on metacpan or search on metacpan
Changelog for perl module AWS::S3
2.00 2025-01-21
- Fix using AWS::S3 for Linode E3 object store (GH #20, thanks to preaction)
- Support using Log::Any for some better debugging (as above)
1.00 2025-02-11
- Start using v4 signatures (resolves GH #18, GH #17, GH #16, GH #14, GH #13, GH #7)
- Adds new session_token and region attributes to the constructor (see perldoc)
0.19 2024-01-08
- Fix "bad hostname" test may fail in presence of wildcard DNS records (GH #19)
0.18 2019-03-01
- Fix leading slashes defaults to off, see honor_leading_slashes arg
README.markdown view on Meta::CPAN
On success, returns the new [AWS::S3::Bucket](https://metacpan.org/pod/AWS%3A%3AS3%3A%3ABucket)
On failure, dies with the error message.
See [AWS::S3::Bucket](https://metacpan.org/pod/AWS%3A%3AS3%3A%3ABucket) for details on how to use buckets (and access their files).
# ENVIRONMENT VARIABLES
## AWS\_S3\_DEBUG
If set, will print out debugging information to `STDERR`.
# SEE ALSO
[The Amazon S3 API Documentation](http://docs.amazonwebservices.com/AmazonS3/latest/API/)
[AWS::S3::Bucket](https://metacpan.org/pod/AWS%3A%3AS3%3A%3ABucket)
[AWS::S3::File](https://metacpan.org/pod/AWS%3A%3AS3%3A%3AFile)
[AWS::S3::FileIterator](https://metacpan.org/pod/AWS%3A%3AS3%3A%3AFileIterator)
lib/AWS/S3.pm view on Meta::CPAN
my @buckets = ();
foreach my $node ( $xml->getElementsByLocalName( 'Bucket' ) ) {
push @buckets,
AWS::S3::Bucket->new(
name => $node->getElementsByLocalName('Name')->string_value,
creation_date => $node->getElementsByLocalName('CreationDate')->string_value,
s3 => $s,
);
} # end foreach()
$LOG->debug('Listed AWS buckets', { buckets => [map $_->name, @buckets] });
return @buckets;
} # end buckets()
sub bucket {
my ( $s, $name ) = @_;
my ( $bucket ) = grep { $_->name eq $name } $s->buckets
or return;
$bucket;
} # end bucket()
lib/AWS/S3.pm view on Meta::CPAN
On success, returns the new L<AWS::S3::Bucket>
On failure, dies with the error message.
See L<AWS::S3::Bucket> for details on how to use buckets (and access their files).
=head1 ENVIRONMENT VARIABLES
=head2 AWS_S3_DEBUG
If set, will print out debugging information to C<STDERR>.
=head1 SEE ALSO
L<The Amazon S3 API Documentation|http://docs.amazonwebservices.com/AmazonS3/latest/API/>
L<AWS::S3::Bucket>
L<AWS::S3::File>
L<AWS::S3::FileIterator>
lib/AWS/S3/Roles/Request.pm view on Meta::CPAN
my $s = shift;
AWS::S3::Signer::V4->new(
-access_key => $s->s3->access_key_id,
-secret_key => $s->s3->secret_access_key,
);
}
);
sub _send_request {
my ( $s, $method, $uri, $headers, $content ) = @_;
$LOG->debug('Making AWS request', {method => $method, uri => "$uri"});
my $req = HTTP::Request->new( $method => $uri );
$req->content( $content ) if $content;
delete($headers->{Authorization}); # we will use a v4 signature
map { $req->header( $_ => $headers->{$_} ) } keys %$headers;
$s->_sign($req);
my $res = $s->s3->ua->request( $req );
( run in 2.629 seconds using v1.01-cache-2.11-cpan-13bb782fe5a )