5. Create IAM role for EC2
The EC2 will get an artifact from S3 bucket. It will communicate with CodeDeploy. Additionally, CodeDeploy agent will be maintained by SSM.
For these, make another IAM role for EC2.
Create IAM role with necessary policies
Create IAM role in management console.
In create role step 1, select trusted entity type with AWS service.
Select use case with EC2.
I added 3 managed policies: AmazonS3FullAccess, AWSCodeDeployFullAccess, AmazonSSMFullAccess
Attach this role to the EC2
EC2 - Select instances - Actions - Security - Modify IAM role

Last updated