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
エキスパート
回答済み 1年前
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
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ