Refactoring in response to : https://github.com/aws/aws-sdk-ruby/pull/125#commitcomment-2448789