In this recipe, we will create a role that allows an EC2 instance to access S3 APIs and then attach it to an EC2 instance. IAM roles provide temporary permissions for an AWS service or user to access another AWS service. A service or user assume a role, and then they are provided with temporary credentials for that session.
Creating and attaching an IAM role to an EC2 instance
Getting ready
We need a working AWS account to complete this recipe. It would be good if you had a working knowledge of IAM and S3 services.
How to do it...
We can create an IAM role with access...