Unable to delete IAM role because of phantom Cognito User Pools

0

I use CloudFormation to create/delete/update AWS resources.

I deleted a stack containing a user pool and later attempted to recreate it and received the following error in the CloudFormation console:

Invalid AttributeDataType input, consider using the provided AttributeDataType enum. (Service: AWSCognitoIdentityProviderService; Status Code: 400; Error Code: InvalidParameterException; Request ID: e26c1912-2af7-4c9c-872d-5234da04c1d9)

Further investigation led me to discover that the following IAM role that is being auto created by my CloudFormation stack was not being deleted:

AWSServiceRoleForAmazonCognitoIdpEmailService

Attempting to delete this IAM role manually fails with the folliowing error:

Role deletion failed
One or more Cognito userpools using are this Service-liked role

In the IAM console I can then view two User Pools - the problem is they don't exist. They're not in the Cognito console (yes I checked the region), and attempting to use the CLI to view them, etc. results in:

User pool us-east-2_xxxxxxxxx does not exist.

I'm assuming they're phantoms of previous User Pools I created.

What to do now? I'm hoping that maybe they're just existing in a cache somewhere that will get purged, but it is going on a entire day now.

preguntada hace 5 años381 visualizaciones
1 Respuesta
0

To answer my own question - the phantom user pools seem to persist for a few days then disappear.

respondido hace 5 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas