Updated to use aws cli access/secret keys first before attempting to use iam roles. It assumes the access/secret keys are stored in ~/.aws/config