AWS Cognito NotAuthorizedException A client attempted to write unauthorized attribute

Question:

I’m using AWS Cognito and aws-cpp-sdk for my application. I defined a user pool and an application, then I got app client id and app secret.
I can create user pool object:

After I defined an user with SignUpRequest, there was an error like this: NotAuthorizedException A client attempted to write unauthorized attribute

This is my signup code:

What is the problem? How can I solve it?

Answer:

Omg! The reason of exception is only writing mistake. The problem is solved by correcting typing error from familiy to family at this line:

Leave a Reply