AWSServiceRoleForAmazonOpenSearchService has been taken in this account

0

Hi, i'm trying to run the next command from Cloud9 env, and it's getting an issue: $ aws iam create-service-linked-role --aws-service-name opensearchservice.amazonaws.com

An error occurred (InvalidInput) when calling the CreateServiceLinkedRole operation: Service role name AWSServiceRoleForAmazonOpenSearchService has been taken in this account, please try a different suffix.

i've tried to unset the credentials variables and export too again, but the issue continues or how to know which services this account has taken? (with some CLI command), thanks

2개 답변
0
수락된 답변

Looking at the contents of the command, it appears to be an error that occurs when there is already a service linkroll for opensearchservice.amazonaws.com.
Since IAM roles cannot be created with the same name, try adding a custom prefix using the "--custom-suffix" command option.
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/create-service-linked-role.html

profile picture
전문가
답변함 일 년 전
0

This error indicates that the role is already there. You may want to look in IAM and look for the role. There can only be one ServiceLinked role with that name per account. You can learn more at https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html

Hope this helps!

profile picture
답변함 일 년 전

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

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

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

관련 콘텐츠