Separated creds check into it's own function, and only allow key and secret to be in the aws.