amplify-cli: amplify push => The following resource(s) failed to create: [UserPoolClientLambda]
Describe the bug
I tried to push amplify to cloud, but i got these error
junui@ijun-uiui-MacBookPro aws-android-workshop % amplify push
✔ Successfully pulled backend environment dev from the cloud.
Current Environment: dev
| Category | Resource name | Operation | Provider plugin |
| -------- | -------------------------- | --------- | ----------------- |
| Auth | awsandroidworkshopf01d4c22 | Create | awscloudformation |
| Api | awsandroidworkshop | Create | awscloudformation |
? Are you sure you want to continue? Yes
The following types do not have '@auth' enabled. Consider using @auth with @model
- Todo
Learn more about @auth here: https://docs.amplify.aws/cli/graphql-transformer/directives#auth
GraphQL schema compiled successfully.
Edit your schema at /Users/junui/AndroidStudioProjects/aws-android-workshop/amplify/backend/api/awsandroidworkshop/schema.graphql or place .graphql files in a directory at /Users/junui/AndroidStudioProjects/aws-android-workshop/amplify/backend/api/awsandroidworkshop/schema
? Do you want to generate code for your newly created GraphQL API Yes
? Enter the file name pattern of graphql queries, mutations and subscriptions app/src/main/graphql/**/*.graphql
? Do you want to generate/update all possible GraphQL operations - queries, mutations and subscriptions Yes
? Enter maximum statement depth [increase from default if your schema is deeply nested] 2
⠹ Updating resources in the cloud. This may take a few minutes...
UPDATE_IN_PROGRESS AuthRole AWS::IAM::Role Fri Nov 27 2020 00:29:12 GMT+0900 (Korean Standard Time)
UPDATE_IN_PROGRESS DeploymentBucket AWS::S3::Bucket Fri Nov 27 2020 00:29:12 GMT+0900 (Korean Standard Time)
UPDATE_IN_PROGRESS UnauthRole AWS::IAM::Role Fri Nov 27 2020 00:29:12 GMT+0900 (Korean Standard Time)
UPDATE_IN_PROGRESS amplify-awsandroidworkshop-dev-00759 AWS::CloudFormation::Stack Fri Nov 27 2020 00:29:07 GMT+0900 (Korean Standard Time) User Initiated
⠇ Updating resources in the cloud. This may take a few minutes...
UPDATE_COMPLETE DeploymentBucket AWS::S3::Bucket Fri Nov 27 2020 00:29:32 GMT+0900 (Korean Standard Time)
UPDATE_COMPLETE AuthRole AWS::IAM::Role Fri Nov 27 2020 00:29:31 GMT+0900 (Korean Standard Time)
UPDATE_COMPLETE UnauthRole AWS::IAM::Role Fri Nov 27 2020 00:29:30 GMT+0900 (Korean Standard Time)
⠏ Updating resources in the cloud. This may take a few minutes...
CREATE_IN_PROGRESS authawsandroidworkshopf01d4c22 AWS::CloudFormation::Stack Fri Nov 27 2020 00:29:35 GMT+0900 (Korean Standard Time) Resource creation Initiated
CREATE_IN_PROGRESS UpdateRolesWithIDPFunctionRole AWS::IAM::Role Fri Nov 27 2020 00:29:34 GMT+0900 (Korean Standard Time) Resource creation Initiated
CREATE_IN_PROGRESS authawsandroidworkshopf01d4c22 AWS::CloudFormation::Stack Fri Nov 27 2020 00:29:34 GMT+0900 (Korean Standard Time)
CREATE_IN_PROGRESS UpdateRolesWithIDPFunctionRole AWS::IAM::Role Fri Nov 27 2020 00:29:33 GMT+0900 (Korean Standard Time)
⠋ Updating resources in the cloud. This may take a few minutes...
CREATE_IN_PROGRESS amplify-awsandroidworkshop-dev-00759-authawsandroidworkshopf01d4c22-JHKPS83KAWWF AWS::CloudFormation::Stack Fri Nov 27 2020 00:29:35 GMT+0900 (Korean Standard Time) User Initiated
⠏ Updating resources in the cloud. This may take a few minutes...
CREATE_IN_PROGRESS SNSRole AWS::IAM::Role Fri Nov 27 2020 00:29:42 GMT+0900 (Korean Standard Time) Resource creation Initiated
CREATE_IN_PROGRESS SNSRole AWS::IAM::Role Fri Nov 27 2020 00:29:41 GMT+0900 (Korean Standard Time)
⠋ Updating resources in the cloud. This may take a few minutes...
CREATE_COMPLETE UpdateRolesWithIDPFunctionRole AWS::IAM::Role Fri Nov 27 2020 00:29:55 GMT+0900 (Korean Standard Time)
⠸ Updating resources in the cloud. This may take a few minutes...
CREATE_COMPLETE SNSRole AWS::IAM::Role Fri Nov 27 2020 00:30:02 GMT+0900 (Korean Standard Time)
⠙ Updating resources in the cloud. This may take a few minutes...
CREATE_IN_PROGRESS UserPool AWS::Cognito::UserPool Fri Nov 27 2020 00:30:07 GMT+0900 (Korean Standard Time)
⠹ Updating resources in the cloud. This may take a few minutes...
CREATE_IN_PROGRESS UserPoolClientWeb AWS::Cognito::UserPoolClient Fri Nov 27 2020 00:30:12 GMT+0900 (Korean Standard Time)
CREATE_COMPLETE UserPool AWS::Cognito::UserPool Fri Nov 27 2020 00:30:09 GMT+0900 (Korean Standard Time)
CREATE_IN_PROGRESS UserPool AWS::Cognito::UserPool Fri Nov 27 2020 00:30:09 GMT+0900 (Korean Standard Time) Resource creation Initiated
⠹ Updating resources in the cloud. This may take a few minutes...
CREATE_COMPLETE UserPoolClient AWS::Cognito::UserPoolClient Fri Nov 27 2020 00:30:15 GMT+0900 (Korean Standard Time)
CREATE_IN_PROGRESS UserPoolClient AWS::Cognito::UserPoolClient Fri Nov 27 2020 00:30:14 GMT+0900 (Korean Standard Time) Resource creation Initiated
CREATE_COMPLETE UserPoolClientWeb AWS::Cognito::UserPoolClient Fri Nov 27 2020 00:30:14 GMT+0900 (Korean Standard Time)
CREATE_IN_PROGRESS UserPoolClientWeb AWS::Cognito::UserPoolClient Fri Nov 27 2020 00:30:14 GMT+0900 (Korean Standard Time) Resource creation Initiated
CREATE_IN_PROGRESS UserPoolClient AWS::Cognito::UserPoolClient Fri Nov 27 2020 00:30:13 GMT+0900 (Korean Standard Time)
⠴ Updating resources in the cloud. This may take a few minutes...
CREATE_IN_PROGRESS UserPoolClientRole AWS::IAM::Role Fri Nov 27 2020 00:30:18 GMT+0900 (Korean Standard Time)
⠸ Updating resources in the cloud. This may take a few minutes...
CREATE_IN_PROGRESS UserPoolClientRole AWS::IAM::Role Fri Nov 27 2020 00:30:18 GMT+0900 (Korean Standard Time) Resource creation Initiated
⠸ Updating resources in the cloud. This may take a few minutes...
CREATE_FAILED UserPoolClientLambda AWS::Lambda::Function Fri Nov 27 2020 00:30:42 GMT+0900 (Korean Standard Time) AccessDeniedExceptionnull (Service: AWSLambdaInternal; Status Code: 403; Error Code: AccessDeniedException; Request ID: c33ad635-9f33-4e02-9505-ba37160e2775; Proxy: null)
CREATE_IN_PROGRESS UserPoolClientLambda AWS::Lambda::Function Fri Nov 27 2020 00:30:42 GMT+0900 (Korean Standard Time)
CREATE_COMPLETE UserPoolClientRole AWS::IAM::Role Fri Nov 27 2020 00:30:38 GMT+0900 (Korean Standard Time)
⠸ Updating resources in the cloud. This may take a few minutes...
CREATE_FAILED amplify-awsandroidworkshop-dev-00759-authawsandroidworkshopf01d4c22-JHKPS83KAWWF AWS::CloudFormation::Stack Fri Nov 27 2020 00:30:43 GMT+0900 (Korean Standard Time) The following resource(s) failed to create: [UserPoolClientLambda].
⠴ Updating resources in the cloud. This may take a few minutes...
CREATE_FAILED authawsandroidworkshopf01d4c22 AWS::CloudFormation::Stack Fri Nov 27 2020 00:30:53 GMT+0900 (Korean Standard Time) Embedded stack arn:aws:cloudformation:ap-northeast-2:447914318995:stack/amplify-awsandroidworkshop-dev-00759-authawsandroidworkshopf01d4c22-JHKPS83KAWWF/2fcb0370-2ffc-11eb-b487-0aa6c7749250 was not successfully created: The following resource(s) failed to create: [UserPoolClientLambda].
⠹ Updating resources in the cloud. This may take a few minutes...
UPDATE_ROLLBACK_IN_PROGRESS amplify-awsandroidworkshop-dev-00759 AWS::CloudFormation::Stack Fri Nov 27 2020 00:30:53 GMT+0900 (Korean Standard Time) The following resource(s) failed to create: [authawsandroidworkshopf01d4c22].
⠹ Updating resources in the cloud. This may take a few minutes...
UPDATE_IN_PROGRESS UnauthRole AWS::IAM::Role Fri Nov 27 2020 00:31:03 GMT+0900 (Korean Standard Time)
UPDATE_IN_PROGRESS AuthRole AWS::IAM::Role Fri Nov 27 2020 00:31:03 GMT+0900 (Korean Standard Time)
UPDATE_IN_PROGRESS DeploymentBucket AWS::S3::Bucket Fri Nov 27 2020 00:31:03 GMT+0900 (Korean Standard Time)
⠼ Updating resources in the cloud. This may take a few minutes...
UPDATE_COMPLETE AuthRole AWS::IAM::Role Fri Nov 27 2020 00:31:23 GMT+0900 (Korean Standard Time)
⠼ Updating resources in the cloud. This may take a few minutes...
DELETE_IN_PROGRESS authawsandroidworkshopf01d4c22 AWS::CloudFormation::Stack Fri Nov 27 2020 00:31:25 GMT+0900 (Korean Standard Time)
DELETE_IN_PROGRESS UpdateRolesWithIDPFunctionRole AWS::IAM::Role Fri Nov 27 2020 00:31:25 GMT+0900 (Korean Standard Time)
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS amplify-awsandroidworkshop-dev-00759 AWS::CloudFormation::Stack Fri Nov 27 2020 00:31:24 GMT+0900 (Korean Standard Time)
UPDATE_COMPLETE DeploymentBucket AWS::S3::Bucket Fri Nov 27 2020 00:31:23 GMT+0900 (Korean Standard Time)
UPDATE_COMPLETE UnauthRole AWS::IAM::Role Fri Nov 27 2020 00:31:23 GMT+0900 (Korean Standard Time)
⠴ Updating resources in the cloud. This may take a few minutes...
DELETE_COMPLETE UserPoolClientLambda AWS::Lambda::Function Fri Nov 27 2020 00:31:28 GMT+0900 (Korean Standard Time)
DELETE_IN_PROGRESS UserPoolClientWeb AWS::Cognito::UserPoolClient Fri Nov 27 2020 00:31:28 GMT+0900 (Korean Standard Time)
DELETE_IN_PROGRESS amplify-awsandroidworkshop-dev-00759-authawsandroidworkshopf01d4c22-JHKPS83KAWWF AWS::CloudFormation::Stack Fri Nov 27 2020 00:31:26 GMT+0900 (Korean Standard Time) User Initiated
⠼ Updating resources in the cloud. This may take a few minutes...
DELETE_COMPLETE UpdateRolesWithIDPFunctionRole AWS::IAM::Role Fri Nov 27 2020 00:31:28 GMT+0900 (Korean Standard Time)
⠦ Updating resources in the cloud. This may take a few minutes...
DELETE_IN_PROGRESS UserPool AWS::Cognito::UserPool Fri Nov 27 2020 00:31:32 GMT+0900 (Korean Standard Time)
DELETE_COMPLETE UserPoolClient AWS::Cognito::UserPoolClient Fri Nov 27 2020 00:31:32 GMT+0900 (Korean Standard Time)
DELETE_IN_PROGRESS UserPoolClient AWS::Cognito::UserPoolClient Fri Nov 27 2020 00:31:31 GMT+0900 (Korean Standard Time)
DELETE_COMPLETE UserPoolClientRole AWS::IAM::Role Fri Nov 27 2020 00:31:30 GMT+0900 (Korean Standard Time)
DELETE_COMPLETE UserPoolClientWeb AWS::Cognito::UserPoolClient Fri Nov 27 2020 00:31:29 GMT+0900 (Korean Standard Time)
DELETE_IN_PROGRESS UserPoolClientRole AWS::IAM::Role Fri Nov 27 2020 00:31:28 GMT+0900 (Korean Standard Time)
⠧ Updating resources in the cloud. This may take a few minutes...
DELETE_COMPLETE SNSRole AWS::IAM::Role Fri Nov 27 2020 00:31:37 GMT+0900 (Korean Standard Time)
DELETE_IN_PROGRESS SNSRole AWS::IAM::Role Fri Nov 27 2020 00:31:34 GMT+0900 (Korean Standard Time)
DELETE_COMPLETE UserPool AWS::Cognito::UserPool Fri Nov 27 2020 00:31:34 GMT+0900 (Korean Standard Time)
⠇ Updating resources in the cloud. This may take a few minutes...
DELETE_COMPLETE amplify-awsandroidworkshop-dev-00759-authawsandroidworkshopf01d4c22-JHKPS83KAWWF AWS::CloudFormation::Stack Fri Nov 27 2020 00:31:38 GMT+0900 (Korean Standard Time)
⠋ Updating resources in the cloud. This may take a few minutes...
UPDATE_ROLLBACK_COMPLETE amplify-awsandroidworkshop-dev-00759 AWS::CloudFormation::Stack Fri Nov 27 2020 00:31:48 GMT+0900 (Korean Standard Time)
DELETE_COMPLETE authawsandroidworkshopf01d4c22 AWS::CloudFormation::Stack Fri Nov 27 2020 00:31:47 GMT+0900 (Korean Standard Time)
⠹ Updating resources in the cloud. This may take a few minutes...Error updating cloudformation stack
⠹ Updating resources in the cloud. This may take a few minutes...
Following resources failed
Resource Name: UserPoolClientLambda (AWS::Lambda::Function)
Event Type: create
Reason: AccessDeniedExceptionnull (Service: AWSLambdaInternal; Status Code: 403; Error Code: AccessDeniedException; Request ID: c33ad635-9f33-4e02-9505-ba37160e2775; Proxy: null)
✖ An error occurred when pushing the resources to the cloud
Resource is not in the state stackUpdateComplete
An error occurred during the push operation: Resource is not in the state stackUpdateComplete
To Reproduce
amplify configure amplify init amplify add auth amplify add api amplify push
Additional context I checked
- amplify configure
- IAM Role => Permission Policy => AdministratorAccess
and, my amplify cli version is 4.36.0
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 27 (7 by maintainers)
Finally able to figure it out. My issue has something to do with my exposed api key case with my users.
I had help from the AWS support. Initially, I was just going to fix my billing payment method, and they mentioned that they locked my account due to the exposed api key. They walked me through it to rotate my API key and I just waited around 3-5 hours to get my account unlocked.
I tried it after following the same steps and it worked
$ amplify add auth $ amplify push
Closing this issue. Looks like the issue was due to locking of AWS accounts from create Lambda functions.
The UserPoolClientLamba ressources points to an IAM role that had disappeared in some way in my case.
I recreated the IAM role directly in IAM with the exact name (Physical ID) and policies of the role that had gone missing. You can find the details of these in AWS CloudFormation, looking at the right stack and the ressources attached.
The role creation went Ok and the stack deployed normally after that.
Best
Thomas Langlois-Meurinne +33 6 44 69 27 35 aconserver@hotmail.commailto:aconserver@hotmail.com
Le 2 mars 2021 à 12:04, Dave Martinez <notifications@github.commailto:notifications@github.com> a écrit :
Hi @t-lmhttps://github.com/t-lm ,
Can you share what you meant by creating the resource manually outside of Amplify?
I’d like to try out what you did hoping it’ll fix the same for me.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/aws-amplify/amplify-cli/issues/5982#issuecomment-788824893, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALVZUJN3646FIFKP7WFUTZ3TBTA4VANCNFSM4UD4IIEQ.
Yeah ! that is true, Even I had an exposed API, that’s why they locked me out of few services, Although I had to make a fresh account before, which worked smoothly. But now I know, What messed up with my first Account . Thanks @dave-martinez