Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

641
Vistas
Invalid AttributeDataType input, consider using the provided AttributeDataType enum

I am trying to create aws cognito user pool using aws cdk. below is my code -

user_pool = _cognito.UserPool(
    stack,
    id="user-pool-id",
    user_pool_name="temp-user-pool",
    self_sign_up_enabled=True,
    sign_in_aliases={
        "username": False,
        "email": True
    },
    required_attributes={
        "email": True
    }   
)

I want to set "Attributes" section in User pool for email . But above code gives me this exception -

Invalid AttributeDataType input, consider using the provided AttributeDataType enum. (Service: AWSCognitoIdentityProviderService; Status Code: 400; Error Code: InvalidParameterException; Request ID:

I have tried many scenarios but it didn't work. Am I missing something here. Any help would be appreciated. Thanks! I was referring this AWS doc to create userpool - https://docs.aws.amazon.com/cdk/api/latest/python/aws_cdk.aws_cognito/UserPool.html and https://docs.aws.amazon.com/cdk/api/latest/python/aws_cdk.aws_cognito/RequiredAttributes.html#aws_cdk.aws_cognito.RequiredAttributes

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

According to a comment on this GitHub issue this error is thrown when an attempt is made to modify required attributes for a UserPool. This leaves you two options:

  1. Update the code such that existing attributes are not modified.
  2. Remove the UserPool and create a new one. E.g. cdk destroy followed by cdk deploy will recreate your whole stack (this is probably not what you want if your stack is in production).
over 4 years ago · Santiago Trujillo Denunciar

0

https://github.com/terraform-providers/terraform-provider-aws/issues/3891

Found a way to get around it in production as well, where you don't need to recreate the user pool.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda