Code Deployment

0

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" } ] }

Rois
已提問 8 個月前檢視次數 176 次
1 個回答
0
已接受的答案

You cannot attach a role with "Principal": { "Service": "codedeploy.amazonaws.com" } to your EC2 instance. You need to create a separate role that EC2 instance can assume. A sample guide to create a role for EC2 instance can be found at this page.

profile picture
HS
已回答 8 個月前
profile picture
專家
已審閱 8 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南