Amazon::DynamoDB::SignatureV4 - support for v4 of the Amazon signing method
version 0.002
my $req = 'GET / HTTP/1.1 ...'; my $amz = Amazon::DynamoDB::SignatureV4->new( scope => '20110909/us-east-1/host/aws4_request', access_key => 'AKIDEXAMPLE', secret_key => 'wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY', host_port => 'dynamodb.us-west-2.amazonaws.com', ); $amz->parse_request($req) my $signed_req = $amz->signed_request($req);
Instantiate a signing object. Expects the following named parameters:
scope - the scope used for requests, typically something like 20130112/us-west-2/dynamodb/aws4_request
20130112/us-west-2/dynamodb/aws4_request
secret_key - your secret key
access_key - your access key
host_port - the host and optional port info, will be something like dynamodb.us-west-2.amazonaws.com
dynamodb.us-west-2.amazonaws.com
Read-only accessor for the algorithm (default is AWS4-HMAC-SHA256)
AWS4-HMAC-SHA256
Read-only accessor for the host and optional port information, as a colon-separated string (e.g. localhost:8000).
localhost:8000
Read-only accessor for the date field.
Read-only accessor for scope information - typically something like 20110909/us-east-1/host/aws4_request.
20110909/us-east-1/host/aws4_request
Readonly accessor for the access key used when signing requests.
Readonly accessor for the secret key used when signing requests.
Read-only accessor for the headers used for signing purposes (a string consisting of the lowercase headers separated by ; in lexical order)
Parses a given request. Takes a single parameter - the HTTP request as a string.
Parses information from an HTTP::Request instance.
Returns the string form of the canonical request, used as an intermediate point in generating the signature.
Returns the \n-separated string as the last step before generating the signature itself.
Calculates the signature for the current request and returns it as a string suitable for the Authorization header.
Authorization
Returns a signed version of the request.
Tom Molesworth <cpan@entitymodel.com>
wrote WebService::Amazon::Signature::v4
Rusty Conover <rusty@luckydinosaur.com> contributed some bug fixes and placed it inside of Amazon::DynamoDB.
Copyright Tom Molesworth 2012-2013. Licensed under the same terms as Perl itself. Copyright Lucky Dinosaur LLC.
To install Amazon::DynamoDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Amazon::DynamoDB
CPAN shell
perl -MCPAN -e shell install Amazon::DynamoDB
For more information on module installation, please visit the detailed CPAN module installation guide.