IAM could not create an EC2 role due to the absence of an instance-profile ARN

1

Hello, I need assistance with creating a new EC2 role. According to the documentation, I should create a new role from IAM and select EC2 under AWS service. However, after creating the role, there is no instance-profile ARN. The IAM user is an administrator with full access. Is there an issue?

Documentation: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html

Kishore
posta 2 mesi fa99 visualizzazioni
1 Risposta
2
Risposta accettata

I haven't created instance profiles via the console in a while, but since you already have your role created, you can create an EC2 instance profile and attach it to your existing role by launching CloudShell and running the following commands. Be sure to replace "EC2RoleForMyServer" with the name of your role:

aws iam create-instance-profile --instance-profile-name EC2RoleForMyServer
aws iam add-role-to-instance-profile --instance-profile-name EC2RoleForMyServer --role-name EC2RoleForMyServer
profile picture
con risposta 2 mesi fa
profile picture
ESPERTO
verificato 2 mesi fa
profile picture
ESPERTO
verificato 2 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