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
feita há 2 meses99 visualizações
1 Resposta
2
Resposta aceita

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
respondido há 2 meses
profile picture
ESPECIALISTA
avaliado há 2 meses
profile picture
ESPECIALISTA
avaliado há 2 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas