Added a function to retrieve credentials from IAM role if no credentials found in environment