Simple perl interface for Amazon DynamoDB
Perl
Switch branches/tags
Nothing to show
Latest commit fda60cf Dec 1, 2015 @ukautz Merge pull request #22 from jpepersack/master
Add property for request_id
Permalink
Failed to load latest commit information.
examples Patch from Benjamin Scott-Abbott for experimental LWP::ConnCache Apr 23, 2012
lib/Net/Amazon Add request_id property + setter code; fix indentation on delta Nov 23, 2015
t Support Binary in updates. Feb 22, 2013
.gitignore Can now retry requests, if limit exceeded / Can now iterate through q… Mar 14, 2012
Changelog Version increase for CPAN Nov 6, 2012
Makefile.PL Support for binary/binary set puts. Feb 22, 2013
README.pod

README.pod

NAME

Net::Amazon::DynamoDB - Simple interface for Amazon DynamoDB

DESCRIPTION

Simple to use interface for Amazon DynamoDB

If you want an ORM-like interface with real objects to work with, this is implementation is not for you. If you just want to access DynamoDB in a simple/quick manner - you are welcome.

See https://github.com/ukautz/Net-Amazon-DynamoDB for latest release.

SYNOPSIS

my $ddb = Net::Amazon::DynamoDB->new(
    access_key => $my_access_key,
    secret_key => $my_secret_key,
    tables     => {
        
        # table with only hash key
        sometable => {
            hash_key   => 'id',
            attributes => {
                id   => 'N',
                name => 'S'
            }
        },
        
        # table with hash and reange key key
        othertable => {
            hash_key   => 'id',
            range_key  => 'range_id',
            attributes => {
                id       => 'N',
                range_id => 'N',
                attrib1  => 'S',
                attrib2  => 'S'
            }
        }
    }
);

# create both tables with 10 read and 5 write unites
$ddb->exists_table( $_ ) || $ddb->create_table( $_, 10, 5 )
    for qw/ sometable othertable /;

# insert something into tables
$ddb->put_item( sometable => {
    id   => 5,
    name => 'bla'
} ) or die $ddb->error;
$ddb->put_item( sometable => {
    id        => 5,
    range_key => 7,
    attrib1   => 'It is now '. localtime(),
    attrib1   => 'Or in unix timstamp '. time(),
} ) or die $ddb->error;