Too Long; Didn't Read
An AWS credential is a personal credential and they are personal and should only be on your personal computer. If the EC2 is ever compromised, so would your personal account. Using the AWS CLI on an EC2 instance is a bad way of configuring the cli and it is insecure. Using IAM Roles is a better way to use IAM Credentials on EC2 instances is to use the IAM Role. The right way is to attach the minimum permissions to the role.