Amazon-S3

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

          print "\t".$key->{key}."\n";  
    }

    # delete key from bucket
    $bucket->delete_key($keyname);

    # delete multiple keys from bucket
    $bucket->delete_keys([$key1, $key2, $key3]);
    
    # delete bucket
    $bucket->delete_bucket;

# DESCRIPTION

This documentation refers to version 2.0.2.

`Amazon::S3` provides a portable client interface to Amazon Simple
Storage System (S3).

This module is rather dated, however with some help from a few
contributors it has had some recent updates. Recent changes include
implementations of:

- ListObjectsV2
- CopyObject
- DeleteObjects
- ListObjectVersions

Additionally, this module now implements Signature Version 4 signing,
unit tests have been updated and more documentation has been added or
corrected. Credentials are encrypted if you have encryption modules installed.

_NEW!_

The `Amazon::S3` modules have been heavily refactored over the last
few releases to increase maintainability and to add new features. New
features include:

- [Amazon::S3::BucketV2](https://metacpan.org/pod/Amazon%3A%3AS3%3A%3ABucketV2)

    This new module implements a mechanism to invoke _almost_ all of the
    S3 APIs using a standard calling method.

    The module will format your Perl objects as XML payloads and enable
    you to provide all of the parameters required to make an API
    call. Headers and URI parameters can also be passed to the
    methods. [Amazon::S3::BucketV2](https://metacpan.org/pod/Amazon%3A%3AS3%3A%3ABucketV2) is a subclass of
    [Amazon::S3::Bucket](https://metacpan.org/pod/Amazon%3A%3AS3%3A%3ABucket), meaning you can still invoke all of the same
    methods found there.

    See [Amazon::S3::BucketV2](https://metacpan.org/pod/Amazon%3A%3AS3%3A%3ABucketV2) for more details.

- Limited Support for Directory Buckets

    This version include limited support for directory buckets.

    You can create and list directory buckets.

    _Directory buckets use the S3 Express One Zone storage class, which
    is recommended if your application is performance sensitive and
    benefits from single-digit millisecond PUT and GET latencies._ -
    [https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html](https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html)

    - list\_directory\_buckets

        List the directory buckets. Note this only returns a list of you
        directory buckets, not their contents. In order to list the contents
        of a directory bucket you must first create a session that establishes
        temporary credentials used to acces the Zonal endpoints. You then use
        those credentials for signing requests using the ListObjectV2 API.

        This process is currently **not supported** by this class.

        [https://docs.aws.amazon.com/AmazonS3/latest/API/API\_CreateSession.html](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html)

        <Lhttps://docs.aws.amazon.com/AmazonS3/latest/API/API\_ListObjectsV2.html>

    - add\_bucket

        You can add a regin and availability zone to this call in order to
        create a directory bucket.

            $bucket->add_bucket({ bucket => $bucket_name, availability_zone => 'use1-az5' });

        Note that your bucket name must conform to the naming conventions for
        directory buckets. -
        [https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html#directory-buckets-name](https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html#directory-buckets-name)

- Addition of version parameter for `delete_key`

    You can now delete a version of a key by including its verion ID.

        $bucket->delete_key($key, $version_id);

- Methods that accept a hash reference can now accept a
`headers` object that may contain any additional headers you might want
to send with a request. Some of the methods that now allow you to pass
a header object include:
    - add\_bucket
    - add\_key
    - get\_key

        Can now be called with a hashref which may include both a `headers`
        and `uri_params` object.

    - delete\_bucket
    - list\_bucket
    - list\_object\_versions
    - upload\_multipart\_object

## Comparison to Other Perl S3 Modules

Other implementations for accessing Amazon's S3 service include
`Net::Amazon::S3` and the `Paws` project. `Amazon::S3` ostensibly
was intended to be a drop-in replacement for `Net:Amazon::S3` that
"traded some performance in return for portability". That statement is
no longer accurate as `Amazon::S3` may have changed the interface in
ways that might break your applications if you are relying on
compatibility with `Net::Amazon::S3`.

However, `Net::Amazon::S3` and `Paws::S3` today, are dependent on



( run in 0.700 second using v1.01-cache-2.11-cpan-437f7b0c052 )