Proper reading of credentials from AWS metadata service