Refactor encrypted aws creds.