Some fixes for dynamodb and python 3.

cc #245