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 Antworten
0
Akzeptierte Antwort

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
EXPERTE
beantwortet vor einem Jahr
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
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen