SimpleDBAdmin – A “PHPMyAdmin-like” Interface for Amazon SimpleDB
July 8, 2010 8 Comments
Amazon SimpleDB is a highly available, scalable, and flexible non-relational data store that offloads the work of database administration. Developers simply store and query data items via web services requests, and Amazon SimpleDB does the rest.
Why SimpleDBAdmin is Needed
- Web-based - so it could be used by anybody anywhere
- Free – for obvious reaons
- Intuitive to use
How it was Built
- The AWS Query Signer from SonaCWS
- Chris Domigan’s Context Menu plug-in for JQuery
- Carhartl’s Cookie plug-in for JQuery
- The xmltojson php library published on IBM developerWorks.
SimpleDBAdmin Features
- Supports saving multiple sets of AWS account credentials, useful if you manage SimpleDB data on multiple accounts.
- Secret keys are encrypted and saved as cookies protected by a simple password. You can access your SimpleDB account from the same computer without having to enter the AWS Access and Secret keys every time.
- An elegant interface for storing, modifying and removing multiple values in the same attribute name. Read about SimpleDB’s data model if you’re unfamiliar with SimpleDB’s ability to hold multiple values with the same attribute name.
- Results are presented in a table format and are pageable.
- Easily add and remove SimpleDB Domains.
Limitations and To-dos
- No Sorting – Currently, Domain contents are returned in SimpleDB’s default order. I believe that this is the same as the chronological order that the items were added, but not sure if this is aways true.
- No Searching – The ability to search the items has not been added yet.
- Large Data – Domains with a large number of attribute names or large attribute values will not display optimally in the web browser.
- No Counts – The interface does not indicate the number of items in each Domain.
Installation

The Login Dialog
Usage
- Name – This is just the name that you want to give your account. If you manage multiple SimpleDB accounts, this will help you keep track of them.
- Access Key – This is your AWS Access Key Id, which can be found from the AWS Credentials page when you are logged into the website.
- Secret Key – This is the AWS Secret Key associated with the Access Key and also found on the AWS Credentials Page.
- Password – This is a password chosen by you. When you return to SimpleDBAdmin from the same web browser, the accounts you created will be available to you if you can enter the password. The password is used to encrypt your Secret Key, so that it is not stored in plaintext in your browser’s cookies.

Browse Data
You can edit an item row by clicking on it. Doing so brings up the Edit Item dialog box:

Editing Data
Clicking the “Add Attribute Name” link will open a dialog that allows you to enter another name-value pair to the record. When you are done making edits, click “Put” to save your changes.
Online Sample
You can give the application a try here:
http://samples.awsninja.com/awsninja_simpledbadmin/
Please don’t use the sample application to manage live web applications or to view or manipulate any sensitive data. The application is not configured to examine or log your data -but you should install your own copy of SimpleDBAdmin to be completely secure.
If you’d like to install a copy on your own server, download it from GitHub.
I welcome questions, comments or suggestions. Thanks for reading.
Thanks for the initiation with SimpleDBAdmin. I’m looking forward to using it, but have a problem getting logged in. I have set it up on my localhost, but get strange JS alert popups: first one saying just “error” then immediately after “parsererror”. All resources seem to be linked corrected and nothing else shows up in my error console. Any ideas?
Hi Nicholas,
It sounds like the relay.php is not returning valid JSON. I can’t say why. You should be able to see the the call to relay.php and what it is returning in Firebug or another browser development environment.
I hope that helps.
In fact the result is completely blank. The params to relay.php was “Action=ListDomains&MaxNumberOfDomains=20&AWSAccessKeyId=AKIAJOGD7U3ES5EHY5IA&Version=2009-04-15&SignatureVersion=2&SignatureMethod=HmacSHA256&Signature=…..&Timestamp=2010-09-30T21%3A12%3A53.000Z”
I don’t see any errors in the apache log.
I just spent some hours playing with your relay.php and some test code. Realised that your code requires PHP>5.2 (whereas your readme says just PHP5). If you add this at the top of your file:
// for PHP4 and PHP5.1 you need this wrapper
// http://www.boutell.com/scripts/jsonwrapper.html
require_once(‘jsonwrapper/jsonwrapper.php’);
and include the content from that page in your source package, this should make it work in PHP5.1
There seem to have been some small changes to simplexml_load_string in 5.2. For 5.1 users you might have to trim the response from AWS before calling.
Found another bug. One of my domains contains a slash, which you do not escape properly.
E.g. “SELECT * FROM jerome-TranslationResult2 LIMIT 10″
should be
“SELECT * FROM `jerome-TranslationResult2` LIMIT 10″
See http://docs.amazonwebservices.com/AmazonSimpleDB/latest/DeveloperGuide/index.html?QuotingRulesSelect.html
Probably best to backtick more stuff in the code? Looking forward to patches. Let me know if I can help!
Thanks so much for this Nicholas! I will implement, test and push these changes in the next day or so. I do need to nail down what versions of PHP I’m supporting and make sure I test.
I really appreciate your efforts!
I’ve just committed changes for SimpleDb admin with the following changes:
1. Fixed bug that affected the selecting of rows of SimpleDb domains that contanined -, ., or began with a number.
2. Implemented changes and tested on PHP 5.0.4.
Thanks again for your help Nicholas.
Pingback: A Simple Framework for Managing your Images, Instances, Volumes and Snapshots on EC2 « AWS Ninja