Fix DynamoDB host override

This PR fixes #1732 and adds a test to prevent it from happening again in the future for DDBv2.

@toastdriven please review as I think this is mostly your code.