From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more

NAME

simpledb - Amazon SimpleDB command line interface

VERSION

version 1.0600

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
simpledb [opts] delete DOMAIN ITEM [NAME[=VALUE]]...
simpledb [opts] select SELECTEXPRESSION

OPTIONS

--help Print help and exit.
--http-proxy-host
--http-proxy-port
--sdb-service-url URL
--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
SELECTEXPRESSION SimpleDB select 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 item names in a domain - note backquotes around domain

simpledb select 'select itemName() from `my-domain`'

# List all items and their attributes matching a given select query:

simpledb select 'select * from mydomain where key2="value2"'

# List all attributes on an item:

simpledb get mydomain item1
simpledb get mydomain item2

# 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
SDB_SERVICE_URL
Alternatives:

FILES

$HOME/.awssecret
If the above fail, then the keys are sought here in the
format expected by the "aws" toolkit (one per line):
access_key_id
secret_access_key
/etc/passwd-s3fs
If all of the above fail, then the keys are sought
here in the format expected by s3fs (colon separated):
access_key_id:secret_access_key

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

2013-09-11 Andrew Solomon <andrew at illywhacker dot net>
- Rebased on SimpleDB::Client
- Removed proxying
- Removed attribute parameters from "get"
2010-04-20 Eric Hammond <ehammond@thinksome.com>
- Removed support for "query". Please migrate to "select"
2009-09-01 Peter Kaminski <kaminski@istori.com>
- Added utf8 binmode for STDOUT
- Added select method
2009-03-16 Eric Hammond <ehammond@thinksome.com>
- Fix --max options and large result sets without --max
2008-06-09 Eric Hammond <ehammond@thinksome.com>
- Fallback to finding keys in $HOME/.awssecret or /etc/passwd-s3fs
2008-06-03 Eric Hammond <ehammond@thinksome.com>
- Completed --max option
- bugfix: Corrected --aws-secret-access-key option spelling
2008-05-26 Eric Hammond <ehammond@thinksome.com>
- Original release