0
I Use This!
Activity Not Available
Analyzed 11 months ago. based on code collected 11 months ago.

Project Summary

This short Perl script provides a simple command line interface to Amazon SimpleDB. It requires you to also install the Perl modules provided by Amazon.

The latest version of this script can be found here:

http://simpledb-cli.notlong.com/
Here is the manpage extracted from the script including installation instructions:

NAME
simpledb - Amazon SimpleDB command line interface

SYNOPSIS
simpledb [opts] create-domain DOMAIN
simpledb [opts] delete-domain DOMAIN
simpledb [opts] list-domains

simpledb [opts] put DOMAIN ITEM [NAME=VALUE]...
simpledb [opts] put-replace DOMAIN ITEM [NAME=VALUE]...
simpledb [opts] get DOMAIN ITEM [NAME]...
simpledb [opts] delete DOMAIN ITEM [NAME[=VALUE]]...

simpledb [opts] query DOMAIN EXPRESSION

OPTIONS
--help Print help and exit.

--aws-access-key-id KEY
AWS access key id
[Defaults to $AWS_ACCESS_KEY_ID environment variable]

--aws-secret-access-key SECRETKEY
AWS secret access key
[Defaults to $AWS_SECRET_ACCESS_KEY environment variable]

--max COUNT
Maximum number of domains/items to retrieve and list.
[Defaults to all]

--separator STRING
Separator between attribute name and value.
[Defaults to equals (=)]

ARGUMENTS
DOMAIN Domain name
ITEM Item name
NAME Attribute name
VALUE Attribute value
EXPRESSION SimpleDB query expression

DESCRIPTION
This utility provides a simple command line interface to most Amazon
SimpleDB (SDB) actions.

EXAMPLES
# The following examples assume you have set these environment
variables:

export AWS_ACCESS_KEY_ID=...
export AWS_SECRET_ACCESS_KEY=...

# Create a new SimpleDB domain:

simpledb create-domain mydomain

# List the domains for this account:

simpledb list-domains

# Create some items with attribute name=value pairs:

simpledb put mydomain item1 key1=valueA key2=value2 x=why

simpledb put mydomain item2 key1=valueB key2=value2 y=zee

# Add another value for an attribute on an item:

simpledb put mydomain item2 y=zed when=now who=you

# Replace all values for specific attributes on an item:

simpledb put-replace mydomain item1 key1=value1 newkey=newvalue

# Delete all values for specific attributes on an item:

simpledb delete mydomain item1 x

# Delete specific values for specific attributes on an item:

simpledb delete mydomain item2 who=you

# List all of the item names:

simpledb query mydomain

# List all of the item names matching a given query:

simpledb query mydomain "['key2'='value2']"

simpledb query mydomain "['key2'='value2'] intersection ['y'='zee']"

# List all attributes on an item:

simpledb get mydomain item1

simpledb get mydomain item2

# List specific attributes on an item:

simpledb get mydomain item2 key2 y

# Delete the entire SimpleDB domain including all items and attributes:

simpledb delete-domain mydomain

ENVIRONMENT
AWS_ACCESS_KEY_ID
Default AWS access key id

AWS_SECRET_ACCESS_KEY
Default AWS secret access key

INSTALLATION
BEWARE! The installation of dependencies is somewhat messy with this
release and may require some understanding of how Perl works!

This tool depends on the following Perl modules from CPAN:

Getopt::Long
Pod::Usage
Digest::SHA1
Digest::HMAC
XML::Simple

You can install them using the "cpan" command on many Linux distros:

sudo cpan Getopt::Long Pod::Usage Digest::SHA1 Digest::HMAC XML::Simple

This tool also depends on the Amazon::SDB modules provided by Amazon
(not the one in CPAN). Amazon's modules can be found here:

http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1136

Here is how I installed them.

curl -Lo amazon-simpledb-perl-library.zip \
http://amazon-simpledb-perl-library.notlong.com

unzip amazon-simpledb-perl-library.zip

sitelib=$(perl -MConfig -le 'print $Config{sitelib}')
sudo scp -r amazon-simpledb-*-perl-library/src/Amazon $sitelib

Finally, this command line interface can be installed with:

sudo curl -Lo /usr/local/bin/simpledb http://simpledb-cli.notlong.com
sudo chmod +x /usr/local/bin/simpledb

SEE ALSO
Amazon SimpleDB (SDB)
http://www.amazon.com/SimpleDB-AWS-Service-Pricing/b/?node=342335011

Amazon SimpleDB Developer Guide
http://docs.amazonwebservices.com/AmazonSimpleDB/2007-11-07/DeveloperGui
de/

sdbShell (another SimpleDB command line interface by David Kavanagh)
http://code.google.com/p/typica/

CAVEATS
As currently written this tool does not support keys containing equal
signs (=).

Output will be difficult to parse if the values contain newlines.

HISTORY
2008-06-03 Eric Hammond
- Completed --max option

2008-05-26 Eric Hammond
- Original release

Tags

amazon aws ec2 perl sdb simpledb

In a Nutshell, amazon-simpledb-cli...

This Project has No vulnerabilities Reported Against it

Did You Know...

  • ...
    Black Duck offers a free trial so you can discover if there are open source vulnerabilities in your code
  • ...
    search using multiple tags to find exactly what you need
  • ...
    in 2016, 47% of companies did not have formal process in place to track OS code
  • ...
    check out hot projects on the Open Hub

Languages

Languages?height=75&width=75
HTML
36%
Perl
63%
Make
1%

30 Day Summary

Apr 9 2016 — May 9 2016

12 Month Summary

May 9 2015 — May 9 2016

Ratings

Be the first to rate this project
Click to add your rating
   Spinner
Review this Project!