Net::A...:Client(3pm)
π Net::A...:Client β the manual page, but make it make sense π
okay bestie, this is User Contributed Perl Documentation for Net::A...:Client(3pm) β yes the name is literally abbreviated with dots like that, it's giving mystery, it's giving ellipsis, we love her regardless β¨
πΈ NAME πΈ
Net::Amazon::S3::Client β an easy-to-use Amazon S3 client. that's it. that's the whole name section. lowercase slay. π
π VERSION π
version 0.992
she's at 0.992, not quite 1.0, we're on the journey together fr fr π¦
β¨ SYNOPSIS β¨
okay so here's the whole vibe, look:
# Build Client instance
my $client = Net::Amazon::S3::Client->new (
# accepts all Net::Amazon::S3's arguments
aws_access_key_id => $aws_access_key_id,
aws_secret_access_key => $aws_secret_access_key,
retry => 1,
);
# or reuse an existing S3 connection
my $client = Net::Amazon::S3::Client->new (s3 => $s3);
# list all my buckets
# returns a list of L<Net::Amazon::S3::Client::Bucket> objects
my @buckets = $client->buckets;
foreach my $bucket (@buckets) {
print $bucket->name . "\n";
}
# create a new bucket
# returns a L<Net::Amazon::S3::Client::Bucket> object
my $bucket = $client->create_bucket(
name => $bucket_name,
acl_short => 'private',
location_constraint => 'us-east-1',
);
# or use an existing bucket
# returns a L<Net::Amazon::S3::Client::Bucket> object
my $bucket = $client->bucket( name => $bucket_name );
two ways to build her, one way to list your buckets, one way to make a bucket, one way to grab an existing bucket. iconic behaviour, no notes π₯
π«Ά DESCRIPTION π«Ά
okay so lore time. π
The Net::Amazon::S3 module was written when the Amazon S3 service had just come out, and it is a light wrapper around the APIs. Some bad API decisions were also made. π we don't talk about it. we've grown.
The Net::Amazon::S3::Client, Net::Amazon::S3::Client::Bucket and Net::Amazon::S3::Client::Object classes are designed after years of usage to be easy to use for common tasks. character development!! π
These classes throw an exception when a fatal error occurs. It also is very careful to pass an MD5 of the content when uploaded to S3 and check the resultant ETag. she's thorough. she checks receipts. π§Ύ
β οΈ WARNING: This is an early release of the Client classes, the APIs may change. π so like. don't build your whole personality on these signatures. she said what she said.
π CONSTRUCTOR π
the things you can hand over when you make her:
s3β aNet::Amazon::S3instance.error_handler_classβ the error handler class name (the package name, bestie π ), seeNet::Amazon::S3::Error::Handlerfor more. It overrides one available in"s3".
Default: Net::Amazon::S3::Error::Handler::Confess β yes, it confesses. dramatic much? π
error_handlerβ an instance of the error handler class.
π METHODS π
π new
Net::Amazon::S3::Client can be constructed two ways.
Historically it wraps an S3 API instance, like:
use Net::Amazon::S3::Client;
my $client = Net::Amazon::S3::Client->new (
s3 => .... # Net::Amazon::S3 instance
);
π new (since v0.92)
Since v0.92 explicit creation of the S3 API instance is no longer necessary. Net::Amazon::S3::Client's constructor accepts same parameters as Net::Amazon::S3:
use Net::Amazon::S3::Client v0.92;
my $client = Net::Amazon::S3::Client->new (
aws_access_key_id => ...,
aws_secret_access_key => ...,
...,
);
glow up unlocked β¨
π¦ buckets
# list all my buckets
# returns a list of L<Net::Amazon::S3::Client::Bucket> objects
my @buckets = $client->buckets;
foreach my $bucket (@buckets) {
print $bucket->name . "\n";
}
πΈ create_bucket
# create a new bucket
# returns a L<Net::Amazon::S3::Client::Bucket> object
my $bucket = $client->create_bucket(
name => $bucket_name,
acl_short => 'private',
location_constraint => 'us-east-1',
);
π bucket
# or use an existing bucket
# returns a L<Net::Amazon::S3::Client::Bucket> object
my $bucket = $client->bucket( name => $bucket_name );
β bucket_class
# returns string "Net::Amazon::S3::Client::Bucket"
# subclasses will want to override this.
my $bucket_class = $client->bucket_class
subclasses, y'all know what to do. override it. that's your moment, your main character arc π
π§ AUTHOR π§
Branislav ZahradnΓk <barney@cpan.org>
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2025 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav ZahradnΓk.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
okay that's the whole page bestie, you ate, I ate, S3 bucket created, periodt π β¨
signing off from perl v5.40.1, dated 2025-12-07, still answering to the name Net::A...:Client(3pm) π«Ά
π¦ where this page comes from
- ubuntu resolute: libnet-amazon-s3-perl 0.992-1 Β· other
- ubuntu stonking: libnet-amazon-s3-perl 0.992-1 Β· other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms