AdminCreateUser operation: PreSignUp invocation failed due to error AccessDeniedException. #4080
Unanswered
usernamemikem
asked this question in
Q&A
Replies: 2 comments
-
This is what you get when you inherit other peoples work, LOL! The pool I was testing with, the Lambda defined under Associated Integrations no longer exists. I removed it from the pool and my restore worked. I love playing connect the dots. :) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Seem so simple but I get the following error trying to add a user to a Cognito User pool.
An error occurred (UnexpectedLambdaException) when calling the AdminCreateUser operation: PreSignUp invocation failed due to error AccessDeniedException.
I'm using my own Admin credentials, it not a Lambda, I'm running it in Visual Studio but I do get the same error with my Lambda. I thought that error happens when the Pool is invoking the Lambda, which is not the case.
client = boto3.client('cognito-idp',region_name='us-east-1')
response = client.admin_create_user(
UserPoolId = poolid,
Username = ["Username"],
UserAttributes = ["Attributes"],
MessageAction = "SUPPRESS",
DesiredDeliveryMediums = [
'EMAIL',
]
)
I get the proper response if the user already exists.
My code looks exactly like all examples I've seen.
Thanks for your help.
Mike
Beta Was this translation helpful? Give feedback.
All reactions