In a Sentence: A web interface for Amazon SimpleDB.
SimpleDBAdmin is an administration tool for Amazon SimpleDB. If you don’t know what SimpleDB is here’s the first paragraph from Amazon’s SimpleDB site:
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
I started building SimpleDBAdmin because I wanted a package to administer my SimpleDB data that met the following criteria:
Web-based - so it could be used by anybody anywhere
Free – for obvious reaons
Intuitive to use
There are a couple of web-based SimpleDB managers out there, but I found them to be incredibly difficult to use for actually manipulating data. They seem to be designed for the purpose of teaching basic SimpleDB concepts to programmers. That’s a laudable goal but it’s not what I was looking for. AWSZone and Amazon’s own JavaScript Scratchpad expose all of the intricacies of the SimpleDB API and require you to perform actions like “Invoke Request” or use “PutAttributes.” Rather than deal with all that, I wanted a package that provides a higher level of abstraction and focuses mainly on letting the user view and manipulate data. SimpleDBAdmin is designed to meet that need.
How it was Built
Because I wanted to make it possible to use the application on any platform, the vast majority of the application is written in JavaScript and based on JQuery. In addition to JQuery and JQuery UI, the following packages are also used:
Also included is a PHP component called relay.php that handles relaying the API commands to SimpleDB. This is needed because the JavaScript Same Origin policy prevents a JavaScript application from sending requests to a separate domain name. The relay.php component receives the completed request from the SimpleDBAdmin JavaScript package, passes it on to SimpleDB, receives the XML response from SimpleDB, converts it to JSON and passes it back to the JavaScript package.
Note: Your AWS Secret Key is not sent to the relay.php script. Instead, the signed request is created in JavaScript and sent to relay.php. This prevents your Secret Key from being exposed in the internet traffic between the browser and server.
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
To install SimpleDBAdmin, download the package from GitHub and place the contents somewhere on your server’s web root. Then navigate to the index.html with your web browser. When you get it set up, it looks like this:
Login Dialog
The Login Dialog
If it doesn’t work, you may need to adjust some of the paths within the index.html, relay.php or SimpleDbAdmin.js.
Usage
Once you’ve got the package installed and have the dialog shown above displayed in your browser, you then must enter your SimpleDB credentials. To do this, fill in the form shown above with the following values:
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.
Once you’ve entered your credentials, you should see your SimpleDB Domains (if any) listed on the left side of the screen. You can click any of those Domains to browse through the data. You can right click for the option to Delete a Domain (you will be asked to confirm this action). You can also add a new Domain by clicking the “Add Domain” button.
Browse Data
Browse Data
You can edit an item row by clicking on it. Doing so brings up the Edit Item dialog box:
Editing Data
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.
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?
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.
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 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:
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’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.
I honestly had not seen jqgrid before. I think I originally tried to implement DataTables, but gave up pretty quickly for reasons I don’t totally remember.
I will definitely look into jqgrid when I get some time.
[...] This post was mentioned on Twitter by Al Cornish, Jay Muntz. Jay Muntz said: @alncornish I feel your pain and I've actually started working on it myself: http://bit.ly/9CYfg9 [...]
[...]Thank you, I’ve just been looking for info about this subject for ages and yours is the greatest I’ve discovered till now. But, what about the bottom line? Are you sure in regards to the source?|What i don’t realize is if truth be told how you…
Your informational article is very informative, but also interesting and unique. Your views on this topic give readers options to agree or disagree. I agree. http://www.samsung1080phdtv.net/
[...]I feel that is among the most vital info for me. And i’m happy studying your article. However want to commentary on some basic things, The web site style is ideal, the articles is truly great : D. Just right job, cheers[...]…
The following time I read a blog, I hope that it doesnt disappoint me as much as this one. I imply, I do know it was my option to learn, however I truly thought youd have one thing attention-grabbing to say. All I hear is a bunch of whining about something that you might repair if you werent too busy on the lookout for attention.
Kazuc is a resource for PHP clone scripts, only at 19.95$…
[...]Normally I do not learn article on blogs, but I would like to say that this write-up very forced me to check out and do it! Your writing style has been amazed me. Thanks, very nice post.[...]…
[...]Wonderful post, very informative. I wonder why the opposite specialists of this sector don’t realize this. You must proceed your writing. I am sure, you’ve a huge readers’ base already!|What’s Happening i am new to this, I stumbled upon this I…
[...]Magnificent items from you, man. I have bear in mind your stuff previous to and you are simply too fantastic. I really like what you’ve bought here, really like what you’re stating and the way in which in which you say it. You are making it ente…
Nicholas Tolley Cottrell
September 30th, 2010 at 10:54 am
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?
Jay Muntz
September 30th, 2010 at 11:08 am
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.
Nicholas Tolley Cottrell
September 30th, 2010 at 5:24 pm
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.
Nicholas Tolley Cottrell
September 30th, 2010 at 7:16 pm
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.
Nicholas Tolley Cottrell
September 30th, 2010 at 7:22 pm
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!
Jay Muntz
September 30th, 2010 at 9:10 pm
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!
Jay Muntz
October 4th, 2010 at 4:26 pm
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.
A Simple Framework for Managing your Images, Instances, Volumes and Snapshots on EC2 « AWS Ninja
October 7th, 2010 at 5:56 pm
[...] even when none of the resources of your application are running by running a SimpleDB client like SimpleDBAdmin or [...]
Nicholas Tolley Cottrell
October 10th, 2010 at 7:41 am
Thanks for the updates! Everything working now.
Dan
October 15th, 2010 at 10:53 am
Seeing the same errors as Nicholas when using:
PHP 5.3.2-1ubuntu4.5 with Suhosin-Patch (cli) (built: Sep 17 2010 13:41:55)
I’ll see what relay.php is sending back.
Dan
October 15th, 2010 at 11:54 am
It’s working now. Modified the require_once()s in relay.php to fit where I put everything.
I like the way you have the credentials stored on the client instead of in the php — elegant solution.
Have you considered dumping the results into jqgrid for pretty tables?
Jay Muntz
October 16th, 2010 at 9:14 am
Hey Dan – thanks for commenting.
I honestly had not seen jqgrid before. I think I originally tried to implement DataTables, but gave up pretty quickly for reasons I don’t totally remember.
I will definitely look into jqgrid when I get some time.
Tweets that mention SimpleDBAdmin – A "PHPMyAdmin-like" Interface for Amazon SimpleDB- AWSNinja -- Topsy.com
November 10th, 2010 at 7:08 pm
[...] This post was mentioned on Twitter by Al Cornish, Jay Muntz. Jay Muntz said: @alncornish I feel your pain and I've actually started working on it myself: http://bit.ly/9CYfg9 [...]
Teo
October 17th, 2011 at 11:14 pm
hi,
I got 2 error dialogs with only ‘error’ message in the dialog when pressing ‘GO’ button after input my account info.
My configuration:
Apache HTTP server 2.2.x
PHP 5.3
Window XP
shoes store
December 28th, 2011 at 2:08 pm
shoes store…
[...]Thank you, I’ve just been looking for info about this subject for ages and yours is the greatest I’ve discovered till now. But, what about the bottom line? Are you sure in regards to the source?|What i don’t realize is if truth be told how you…
samsung 1080p hdtv
December 28th, 2011 at 3:29 pm
Your informational article is very informative, but also interesting and unique. Your views on this topic give readers options to agree or disagree. I agree. http://www.samsung1080phdtv.net/
Como Vender Ouro
December 28th, 2011 at 8:00 pm
Como Vender Ouro…
[...]I feel that is among the most vital info for me. And i’m happy studying your article. However want to commentary on some basic things, The web site style is ideal, the articles is truly great : D. Just right job, cheers[...]…
rebeca
December 29th, 2011 at 2:14 am
The following time I read a blog, I hope that it doesnt disappoint me as much as this one. I imply, I do know it was my option to learn, however I truly thought youd have one thing attention-grabbing to say. All I hear is a bunch of whining about something that you might repair if you werent too busy on the lookout for attention.
steven
December 29th, 2011 at 4:49 am
You made some respectable points there. I appeared on the web for the difficulty and located most people will go along with along with your website.
Kazuc is a resource for PHP clone scripts, only at 19.95$
December 29th, 2011 at 11:25 am
Kazuc is a resource for PHP clone scripts, only at 19.95$…
[...]Normally I do not learn article on blogs, but I would like to say that this write-up very forced me to check out and do it! Your writing style has been amazed me. Thanks, very nice post.[...]…
twitter followers fast
December 30th, 2011 at 12:09 pm
twitter followers fast…
[...]Wonderful post, very informative. I wonder why the opposite specialists of this sector don’t realize this. You must proceed your writing. I am sure, you’ve a huge readers’ base already!|What’s Happening i am new to this, I stumbled upon this I…
current
January 27th, 2012 at 2:55 am
current…
[...]Magnificent items from you, man. I have bear in mind your stuff previous to and you are simply too fantastic. I really like what you’ve bought here, really like what you’re stating and the way in which in which you say it. You are making it ente…
Brett
April 11th, 2013 at 11:05 am
Hello to every one, as I am genuinely keen of reading this website’s post to be updated regularly. It consists of nice information.