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
posta 10 mesi fa208 visualizzazioni
1 Risposta
0
Risposta accettata

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
con risposta 10 mesi fa
profile picture
ESPERTO
verificato 10 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande