Net::Amazon::Signature::V4(3pm)

Net::Amazon::Signature::V43pm

Implements the amazon web services signature version 4, aws4-hmac-sha256

Usage

    use Net::Amazon::Signature::V4;
    my $sig = Net::Amazon::Signature::V4->new( $access_key_id, $secret, $endpoint, $service );
    my $req = HTTP::Request->parse( $request_string );
    my $signed_req = $sig->sign( $req );
    ...

Version

Version 0.21

Overview

This module signs an HTTP::Request to Amazon Web Services by appending an Authorization header. Amazon Web Services signature version 4, AWS4-HMAC-SHA256, is used.

The primary purpose of this module is to be used by Net::Amazon::Glacier.

Methods

new

    my $sig = Net::Amazon::Signature::V4->new( $access_key_id, $secret, $endpoint, $service );
    my $sig = Net::Amazon::Signature::V4->new({
        access_key_id => $access_key_id,
        secret        => $secret,
        endpoint      => $endpoint,
        service       => $service,
    });

Constructs the signature object, which is used to sign requests.

Note that the access key ID is an alphanumeric string, not your account ID. The endpoint could be "eu-west-1", and the service could be "glacier".

Since version 0.20, parameters can be passed in a hashref. The keys "access_key_id", "secret", "endpoint", and "service" are required. "security_token", if passed, will be applied to each signed request as the "X-Amz-Security-Token" header.

sign

    my $signed_request = $sig->sign( $request );

Signs a request with your credentials by appending the Authorization header. $request should be an HTTP::Request. The signed request is returned.

Support

You can find documentation for this module with the perldoc command.

    perldoc Net::Amazon::Signature::V4

You can also look for information at:

•

RT: CPAN's request tracker (report bugs here)

<https://rt.cpan.org/Public/Dist/Display.html?Name=Net-Amazon-Signature-V4>

•

Source on GitHub

<https://github.com/Grinnz/Net-Amazon-Signature-V4>

•

Search CPAN

<https://metacpan.org/release/Net-Amazon-Signature-V4>

Releases

Unchanged in 2 releases since Debian 12 (Bookworm).

  1. 12–13

Author

Tim Nordenfur, "<tim at gurka.se>"

Maintained by Dan Book, "<dbook at cpan.org>"

Bugs

Please report any bugs or feature requests to "bug-Net-Amazon-Signature-V4 at rt.cpan.org", or through the web interface at <https://rt.cpan.org/Public/Bug/Report.html?Queue=Net-Amazon-Signature-V4>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

From libnet-amazon-signature-v4-perl 0.21-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.