Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon SimpleDB Javascript interface possible?

I'm checking out amazon simpledb documentation. They mention only server side languages.

Is there anyway to insert data into the db directly from the client side without going through a server?

If not, how come?

like image 206
JSNewbie Avatar asked Aug 24 '10 05:08

JSNewbie


People also ask

Which type of service is used for Amazon SimpleDB?

Amazon SimpleDB is a highly available NoSQL 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.

Is AWS SimpleDB deprecated?

SimpleDB is deprecated, more expensive than DDB, and kind of weird to use.

What are the features of Amazon SimpleDB?

Amazon SimpleDB automatically manages infrastructure provisioning, hardware and software maintenance, replication and indexing of data items, and performance tuning. Highly available: Amazon SimpleDB automatically creates multiple geographically distributed copies of each data item you store.


1 Answers

Yes and no. Since you need to protect your secret key for AWS (hackers could use it to abuse your account), you can't authenticate requests in JS directly.

While you could create an implementation in JS, it would be inherently insecure. Practical for some internal uses, it could never be safely deployed (as that would expose your secret key). What you could do instead is use your server to authenticate the requests to SimpleDB and let the JS perform the actual request to Amazon. Though it's a bit roundabout, it would work.

The downside is that you'd need to do a bunch of processing on the client side. You're also likely fetching more data than your app consumes/outputs, so processing the data on the client instead of on the server would likely encounter more latency simply because you're transferring more data to the user and processing it more slowly.

Hope this helps

like image 135
mattbasta Avatar answered Sep 27 '22 15:09

mattbasta