Testing apps using AWS DynamoDB locally with the AWS CLI and JavaScript AWS SDK

One challenge when developing and testing code locally before you deploy is how you test against resources that are provisioned in the cloud. You can point directly to your cloud resources, but in some cases it’s easier if you can run and test code locally before you deploy.

DynamoDB has a local runtime that you can download and run locally from here.

Once downloaded run with:

java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb

You can use the AWS CLI to execute any of the DynamoDB commands against your local db by passing the –endpoint-url option like this:

aws dynamodb list-tables --endpoint-url http://localhost:8000

Docs for the available DynamoDB commands are here.

Other useful cli commands (append–endpoint-url http://localhost:8000 to use the local db):

List all tables:

aws dynamodb list-tablesĀ 

Delete a table:

aws dynamodb delete-table --table-name tablename

Scan a table (with no criteria)

aws dynamodb scan --table-name tablename


Is Zuckerberg’s hoodie really ‘a mark of immaturity’?

An industry analyst who recently met with Zuckerberg about investment plans in Facebook stated that he thought Zuckerberg’s trademark hoodie isĀ ‘a mark of immaturity’, implying that he should have been more suitably dressed for the business meeting.

Over on Google+, Robert Scoble posted about the analyst’s comment, which unleashed the most active community discussion that I’ve ever seen on G+ as a result of a single post. Opinions ranged wildly, but the activity in the discussion proves the absurdity and out of date thinking behind the expectation that professional business atire should be nothing other than suit, shirt and tie.

Times change, fashions change. The suit in today’s world is an absurd form of clothing. It has no practical benefits and is purely for show. This is my key issue – I don’t see how a suit is relevant in today’s world (in the software development world that I live in, at least) – wearing a suit does not make anyone a better software developer. It does not gift the developer with magical coding skills. It’s purely for show.

The popular saying ‘don’t judge a book by it’s cover’ hits the nail on the head with this issue. Wearing a suit is nothing more than a cover on a book. As the other expression goes, ‘first impressions count’, but the fact is, once you’ve got beyond that faux outer layer to discover the contents of the person that has wrapped themselves in fancy, overpriced fabrics, it’s hard to hide the facts without the flashy threads. In software development, you can either code or you can’t. You either gel with the team, or you don’t. You perform or you don’t. Each of these have varying levels of degree, but the key point is this: a suit is nothing more than fancy plumage. Remove the outer shell and show me what you’ve got.

There’s some awesome comments to Scoble’s post that capture my thoughts entirely, that I’d like to quote here that make the point perfectly:

"wearing a tie doesn't make you money, not unless you sell ties"
"If you need to wear a costume to play out your roles, you should 
have become an actor or actress long ago"