Signer::AWSv4::S3 - Implements the AWS v4 signature algorithm
use Signer::AWSv4::S3; $s3_sig = Signer::AWSv4::S3->new( access_key => 'AKIAIOSFODNN7EXAMPLE', secret_key => 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY', method => 'GET', key => 'test.txt', bucket => 'examplebucket', region => 'us-east-1', expires => 86400, version_id => '1234561zOnAAAJKHxVKBxxEyuy_78901j', content_type => 'text/plain', content_disposition => 'inline; filename=New Name.txt', ); say $s3_sig->signed_url;
Generates S3 Presigned URLs.
This module adds two required attributes in the constructor for obtaining an S3 Presigned URL:
The name of the object in S3. This should not start with a slash (/)
The name of the S3 bucket
VersionId used to reference a specific version of the object.
There are times when you want to override certain response header values in a GET response.
Sets the Cache-Control header of the response.
Sets the Content-Disposition header of the response
Sets the Content-Encoding header of the response.
Sets the Content-Language header of the response.
Sets the Content-Type header of the response.
Apart from those in Signer::AWSv4, a convenience attribute is added:
The presigned URL to download the object
The source code is located here: https://github.com/pplu/AWSv4Signer
Please report bugs to: https://github.com/pplu/AWSv4Signer/issues
Jose Luis Martinez pplusdomain@gmail.com
Copyright (c) 2018 by Jose Luis Martinez
This code is distributed under the Apache 2 License. The full text of the license can be found in the LICENSE file included with this module.
To install Signer::AWSv4, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Signer::AWSv4
CPAN shell
perl -MCPAN -e shell install Signer::AWSv4
For more information on module installation, please visit the detailed CPAN module installation guide.