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
질문됨 한 달 전97회 조회
1개 답변
2
수락된 답변

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
답변함 한 달 전
profile picture
전문가
검토됨 한 달 전
profile picture
전문가
검토됨 한 달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠