Premature amazon client created causednull ref.

Premature amazon client created causednull ref.