Fixing: An error occurred (EntityAlreadyExists) when calling the CreateOpenIDConnectProvider operation: Unknown

If you try to create an OpenID connect provider with Auth0 + Cognito, you may get this error:

An error occurred (EntityAlreadyExists) when calling the CreateOpenIDConnectProvider operation: Unknown

E.g. I get it for this command:

 aws iam create-open-id-connect-provider --url https://dev-o1q7qipw.auth0.com --thumbprint-list 9E99A48A9977714926BB7F3B02E22DA2B0AB7280

The solution is to add a trailing slash to the URL:

 aws iam create-open-id-connect-provider --url https://dev-o1q7qipw.auth0.com/ --thumbprint-list 9E99A48A9977714926BB7F3B02E22DA2B0AB7280

Leave a Reply

Your email address will not be published. Required fields are marked *