Skip to main content

1 year ago

Best Practices for connecting to AWS services from AWS resources

Is the best practice to assign a role to a EC2 instance to interact with other AWS resources or should one use the Access Key ID and Secret access key on the EC2 instances?  I ask because multiple times during the DevOps Professional course I have seen the use of the Access Key ID and Secret Access Key being used as apposed to applying an IAM role to the particular EC2 instance.

Image of craiga
1 year ago
Hello. It is certainly best practice to use an IAM Role when possible. There are times, such as when configuring the aws cli (using the aws configure command) where you are prompted for the access keys and secret access keys. Are there other specific instances that you are unsure about?