Amazon-S3

 view release on metacpan or  search on metacpan

README-TESTING.md  view on Meta::CPAN

spend a few pennies (or don't have access to AWS credentials) you can
try one of the S3 mocking services.  The two of the most popular services
seem to be:

* [LocalStack](https://localstack.io)
* [minio](https://min.io)

Both of these implement a subset of the S3 API. __Note that Some tests will fail
on both services (as of the writing of this document).__ To make it
through the tests, try setting one or more of the environment
variables above which will selectively skip some test.

If you are using a mocking service, you might find it useful to set
the environment variable AWS_EC2_METADATA_DISABLED to a true value.

```
export AWS_EC2_METADATA_DISABLED=true
```

This will prevent the AWS CLI from looking for metadata when you are
not actually running on an EC2 instance or container.  Without this

README.md  view on Meta::CPAN


Amazon S3 also defines XXHash checksum algorithms. They are recognized
by `Amazon::S3` but are not implemented locally in this release.

## Uploads

When an upload is performed through [Amazon::S3::Bucket](https://metacpan.org/pod/Amazon%3A%3AS3%3A%3ABucket),
`Amazon::S3` calculates the configured checksum when that operation
supports checksum submission.

The checksum algorithm is selected using `checksum_algorithm`. The
default is `crc64nvme`.

Managed multipart uploads performed by
`Amazon::S3::Bucket::upload_multipart_object()` also use the
configured checksum algorithm.

Low-level multipart methods do not implicitly enable an additional
checksum algorithm. Applications that directly manage the multipart
workflow are responsible for selecting and carrying the checksum
algorithm through that workflow.

## Downloads

Checksum verification is enabled by default.

When `verify_checksums` is true, object downloads request checksum
metadata from S3. `Amazon::S3` verifies supported `FULL_OBJECT`
checksums returned by the service.

README.md  view on Meta::CPAN


    Optional explicit S3 service endpoint.

    When `endpoint_url` is supplied, `Amazon::S3` uses that endpoint as
    specified and does not rewrite the host when the configured region
    changes.

    The `region` setting still controls the AWS signing region.

    This is useful for S3-compatible services, local test environments, and
    other cases where the caller must select the service endpoint explicitly.

    For example:

        my $s3 = Amazon::S3->new(
          { endpoint_url => 'http://localhost:4566',
            region       => 'us-east-1',
            ...
          }
        );

README.md  view on Meta::CPAN

The constructor default is false.

See ["AUTHENTICATION AND CREDENTIALS"](#authentication-and-credentials).

### checksum\_algorithm

    my $algorithm = $s3->checksum_algorithm;

    $s3->checksum_algorithm('sha256');

Gets or sets the checksum algorithm selected for uploads.

The constructor default is `crc64nvme`.

The constructor validates the initial value. Callers that change this
accessor after construction are responsible for supplying an
algorithm supported by the operation being performed.

See ["CHECKSUMS"](#checksums).

### checksum\_types

lib/Amazon/S3.pm  view on Meta::CPAN


Amazon S3 also defines XXHash checksum algorithms. They are recognized
by C<Amazon::S3> but are not implemented locally in this release.

=head2 Uploads

When an upload is performed through L<Amazon::S3::Bucket>,
C<Amazon::S3> calculates the configured checksum when that operation
supports checksum submission.

The checksum algorithm is selected using C<checksum_algorithm>. The
default is C<crc64nvme>.

Managed multipart uploads performed by
C<Amazon::S3::Bucket::upload_multipart_object()> also use the
configured checksum algorithm.

Low-level multipart methods do not implicitly enable an additional
checksum algorithm. Applications that directly manage the multipart
workflow are responsible for selecting and carrying the checksum
algorithm through that workflow.

=head2 Downloads

Checksum verification is enabled by default.

When C<verify_checksums> is true, object downloads request checksum
metadata from S3. C<Amazon::S3> verifies supported C<FULL_OBJECT>
checksums returned by the service.

lib/Amazon/S3.pm  view on Meta::CPAN


Optional explicit S3 service endpoint.

When C<endpoint_url> is supplied, C<Amazon::S3> uses that endpoint as
specified and does not rewrite the host when the configured region
changes.

The C<region> setting still controls the AWS signing region.

This is useful for S3-compatible services, local test environments, and
other cases where the caller must select the service endpoint explicitly.

For example:

  my $s3 = Amazon::S3->new(
    { endpoint_url => 'http://localhost:4566',
      region       => 'us-east-1',
      ...
    }
  );

lib/Amazon/S3.pm  view on Meta::CPAN

The constructor default is false.

See L</AUTHENTICATION AND CREDENTIALS>.

=head3 checksum_algorithm

  my $algorithm = $s3->checksum_algorithm;

  $s3->checksum_algorithm('sha256');

Gets or sets the checksum algorithm selected for uploads.

The constructor default is C<crc64nvme>.

The constructor validates the initial value. Callers that change this
accessor after construction are responsible for supplying an
algorithm supported by the operation being performed.

See L</CHECKSUMS>.

=head3 checksum_types

lib/Amazon/S3/Bucket.pm  view on Meta::CPAN

create an additional temporary copy.

Temporary files created for C<fh> or C<callback> uploads are removed
after the upload completes or fails.

=head4 Checksums

C<Content-MD5> is added automatically.

C[Amazon::S3](Amazon::S3) also calculates and sends an S3 checksum automatically.
By default, CRC64NVME is used. Most applications do not need to select
or calculate a checksum explicitly.

The checksum algorithm can be changed using the associated
L[Amazon::S3](Amazon::S3) object's C<checksum_algorithm> setting.

See L[Amazon::S3/CHECKSUMS](Amazon::S3/CHECKSUMS).

=head4 Return Value

On success, returns a true value.

lib/Amazon/S3/Bucket.pm  view on Meta::CPAN

    );

Initiates a multipart upload.

=over 4

=item headers

Optional request headers.

When C<x-amz-checksum-algorithm> is supplied, the selected algorithm
is carried through the multipart workflow.

For CRC64NVME, CRC32, and CRC32C, C<x-amz-checksum-type> is set to
C<FULL_OBJECT>.

=item key

Required object key.

=back

In scalar context, returns the upload ID assigned by S3.

In list context, returns the upload ID and the lowercase checksum
algorithm selected for the upload.

Invalid arguments, unsupported explicitly requested checksum
algorithms, or request errors throw an exception.

=head3 list_multipart_upload_parts

  my $xml = $bucket->list_multipart_upload_parts(
    $key,
    $upload_id,
    \%headers,

lib/Amazon/S3/CLI.pm  view on Meta::CPAN

  amzn-s3-cli copy-key bucket-name key new-key

Copies an object to another key in the same bucket.

=item B<create-bucket>

  amzn-s3-cli create-bucket bucket-name

Creates a bucket.

Use C<--region> to select a region other than C<us-east-1>.

C<--availability-zone> may be used to create an S3 Express One Zone
directory bucket.

=item B<delete-key>

  amzn-s3-cli delete-key bucket-name key

Deletes an object.

lib/Amazon/S3/CLI.pm  view on Meta::CPAN

  amzn-s3-cli list-buckets --profile sandbox

Without L<Amazon::Credentials>, credentials are read from:

  AWS_ACCESS_KEY_ID
  AWS_SECRET_ACCESS_KEY
  AWS_SESSION_TOKEN

=head1 S3-COMPATIBLE SERVICES

An alternate S3 endpoint may be selected with C<--endpoint-url>:

  amzn-s3-cli list-buckets --endpoint-url http://localhost:4566 --profile localstack

This is useful for LocalStack and other S3-compatible services.

=head1 OPTIONAL DEPENDENCIES

=over

=item L<Amazon::Credentials>

share/README.md  view on Meta::CPAN


Amazon S3 also defines XXHash checksum algorithms. They are recognized
by `Amazon::S3` but are not implemented locally in this release.

## Uploads

When an upload is performed through [Amazon::S3::Bucket](https://metacpan.org/pod/Amazon%3A%3AS3%3A%3ABucket),
`Amazon::S3` calculates the configured checksum when that operation
supports checksum submission.

The checksum algorithm is selected using `checksum_algorithm`. The
default is `crc64nvme`.

Managed multipart uploads performed by
`Amazon::S3::Bucket::upload_multipart_object()` also use the
configured checksum algorithm.

Low-level multipart methods do not implicitly enable an additional
checksum algorithm. Applications that directly manage the multipart
workflow are responsible for selecting and carrying the checksum
algorithm through that workflow.

## Downloads

Checksum verification is enabled by default.

When `verify_checksums` is true, object downloads request checksum
metadata from S3. `Amazon::S3` verifies supported `FULL_OBJECT`
checksums returned by the service.

share/README.md  view on Meta::CPAN


    Optional explicit S3 service endpoint.

    When `endpoint_url` is supplied, `Amazon::S3` uses that endpoint as
    specified and does not rewrite the host when the configured region
    changes.

    The `region` setting still controls the AWS signing region.

    This is useful for S3-compatible services, local test environments, and
    other cases where the caller must select the service endpoint explicitly.

    For example:

        my $s3 = Amazon::S3->new(
          { endpoint_url => 'http://localhost:4566',
            region       => 'us-east-1',
            ...
          }
        );

share/README.md  view on Meta::CPAN

The constructor default is false.

See ["AUTHENTICATION AND CREDENTIALS"](#authentication-and-credentials).

### checksum\_algorithm

    my $algorithm = $s3->checksum_algorithm;

    $s3->checksum_algorithm('sha256');

Gets or sets the checksum algorithm selected for uploads.

The constructor default is `crc64nvme`.

The constructor validates the initial value. Callers that change this
accessor after construction are responsible for supplying an
algorithm supported by the operation being performed.

See ["CHECKSUMS"](#checksums).

### checksum\_types



( run in 0.883 second using v1.01-cache-2.11-cpan-eca53f54451 )