added try except to make sure iam keys are in env variables