Hi, I tried creating an AWS CI/CD pipeline. I was successful in doing the CI part and for the CD part, I created a code deployment application. After that, I made a Ubuntu EC2 instance and installed the necessary code deployment agent. It was all good up to this but when I tried to attach an IAM role to the EC2 instance, it was not showing up. It's showing only the option of- "No IAM Role". I used "CodeDeploy" for the use case in the CodeDeploy service. Please help me solve this situation. I will attach the IAM role trust entity:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"Service": "codedeploy.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}