Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Managing dev/staging/production on DynamoDB?

We're starting to use DynamoDB, and want separate environments for dev/staging/production. We can't figure out a natural way to do this---do we just create separate AWS accounts? Or do we use the same account, but add silly prefixes to our tables ("dev-products", "staging-products", "prod-products")?

like image 448
Domenic Avatar asked Mar 26 '12 17:03

Domenic


People also ask

Is there an ORM for DynamoDB?

Dynamoid. - Ruby ORM for Amazon's DynamoDB.

Can DynamoDB handle schema changes?

If the changes involve changing the partition key, you can add a new GSI (global secondary index). Moreover, you can always add new columns/attributes to DynamoDB without needing to migrate tables.

How can DynamoDB improve performance?

To Summarize: You can increase your DynamoDB throughput by several times, by parallelizing reads/writes over multiple partitions. Use DynamoDB as an attribute store rather than as a document store. This will not only reduce the read/write costs but also improve the performance of your operations considerably.

Does DynamoDB support replication?

DynamoDB Global Tables allows deploying a multi-region, multi-master DynamoDB replication solution. It is a fully-managed solution, where users need not write any custom code to make changes to data. DynamoDB automatically updates the data before replicating it across different regions.


2 Answers

The standard way to manage this with any amazon products is to create separate accounts and then use consolidated billing so that it doesn't complicate the billing aspect. The thing i like about this is that you don't risk breaking the production code by accidentally running the wrong command. Obviously it doesn't help you if you're logged into the wrong instance but it still helps quite a bit.

Other uses for multiple accounts could be to manage permissions and better testing. Having the accounts separate helps testing because you can reproduce the production account 100% and turn it on and off when you need to test new features. I've talked with amazon premium support about this issue and they've said that this seems to be standard practice for the larger companies. Some of the larger companies have many accounts. At my work here we just have 3 and I find it more useful every day.

like image 137
bwight Avatar answered Sep 20 '22 03:09

bwight


Don't forget Amazon's greatly enhanced IAM for access control. It largely gives you the same benefits of separate accounts. (Separate accounts are still an option if you have want to have different levels of paid support.)

Naming wise, my preference is name.environment.whatever.

like image 20
Brian Gupta Avatar answered Sep 18 '22 03:09

Brian Gupta