NAME
Signer::AWSv4::S3 - Implements the AWS v4 signature algorithm
SYNOPSIS
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;
DESCRIPTION
Generates S3 Presigned URLs.
Request Attributes
This module adds two required attributes in the constructor for obtaining an S3 Presigned URL:
key
The name of the object in S3. This should not start with a slash (/)
bucket
The name of the S3 bucket
versionId
VersionId used to reference a specific version of the object.
Overriding Response Header Values
There are times when you want to override certain response header values in a GET response.
cache_control
Sets the Cache-Control header of the response.
content_disposition
Sets the Content-Disposition header of the response
content_encoding
Sets the Content-Encoding header of the response.
content_language
Sets the Content-Language header of the response.
content_type
Sets the Content-Type header of the response.
Signature Attributes
Apart from those in Signer::AWSv4, a convenience attribute is added:
signed_url
The presigned URL to download the object
BUGS and SOURCE
The source code is located here: https://github.com/pplu/AWSv4Signer
Please report bugs to: https://github.com/pplu/AWSv4Signer/issues
AUTHOR
Jose Luis Martinez
pplusdomain
@gmail
.com
COPYRIGHT and LICENSE
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.