-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Amplify push fails after adding a function #13760
Comments
I tried to delete the function with amplify remove function and added again: Now I get this error: 🛑 Resource is not in the state stackUpdateComplete the examplebackendaws is a complete different app. So I don't understand why it's complaining that the function exists. Is it not possible to have the same function name in different projects? |
hey @juri-diener, function with the same name cannot be created if the function exists in the region.
It appears the stack failed to update on CloudFormation, could you check the stack events on the CloudFormation console for any notable errors? |
I had for couple days again the same issue. I created a function. And when I was done I wanted to push and again it failed. |
Hey @juri-diener, can you run |
Closing the issue due to inactivity. Do reach out to us if you are still experiencing this issue |
This issue is now closed. Comments on closed issues are hard for our team to see. |
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v21.7.3
Amplify CLI Version
11.0.5
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No
Describe the bug
So I added with amplify add function a new lambda function. Added in package.json the "type":"module".
And wrote my function. Then added custom policies to the table and wanted to push the changes, and amplify fails with this error:
This function is the new created one.
In aws.console:
Embedded stack arn:aws:cloudformation:eu-north-1:816334333069:stack/amplify-newapp-dev-c053d-functionacceptOrgFollowing-3DQVL14IIR53/2cb22be0-08bb-11ef-887e-0a25218daa9a5 was not successfully created: The following resource(s) failed to create: [LambdaFunction].
02/05/2024, 21:40:34 | amplify-newapp-dev-c053d | UPDATE_ROLLBACK_COMPLETE | Failed(X)
02/05/2024, 21:40:33 | authnewapp248a1258 (auth) | UPDATE_COMPLETE | -
02/05/2024, 21:40:33 | apinewapp (api) | UPDATE_COMPLETE | -
02/05/2024, 21:38:47 | functionnewapp768a1253PostConfirmation (function) | UPDATE_COMPLETE | -
02/05/2024, 21:38:47 | functioncreateOrgAndEverything (function) | UPDATE_COMPLETE | -
02/05/2024, 21:38:36 | storagenewapp (storage) | UPDATE_COMPLETE | -
02/05/2024, 21:38:35 | amplify-newapp-dev-c053d | UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS
Until this error message below it takes like over 30 minutes until it appears . I don't think this is normal.
Rolled back (6 of 5)
🛑 ["Index: 4 State: {"deploy":"waitingForDeployment"} Message: Resource is not in the state stackUpdateComplete"]
Then I tried to add a new env and tried to push it, and it worked. WHY?
Honestly it's kinda annoying, It really stops me in my development.
Please solve this issue.
Maybe if I did something wrong then every hint is really appreciated.
Expected behavior
Should work after adding Lambda functions
Reproduction steps
amplify add function
amplify update function
Resource access permission
storage
amplify push
Project Identifier
ebfc1cb67b3e849d27a343745c7d5874
Log output
Additional information
No response
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: