Updated for the new aws sdk
Fix conflicts and merge.