Closed catherine-augustine closed 3 years ago
Hey @catherine-augustine :wave: thanks for raising this! I was not able to reproduce in Windows on the latest release of Node 12.x and Amplify CLI 5.1.0. I have a couple of follow-up questions to better understand the context:
Are there any additional, cloudformation-related logs that show what failed to update?
// I saw the error message on the cli terminal and I am not sure if I can check somewhere else for the logs . Let me know please, I can update.
What kind of modifications were made to the Lambda?
// The lambda function was fetching records from a S3 file using a SQL query. The first time when I created it, it deployed fine. I just removed console logs and it didnt work.
Is the Lambda a part of a layer?
// I added lambda function for the api that I created using amplify add api
I created another env and tried pushing the changes there , and I see the error in first place
Hey @catherine-augustine thank you for the information! May you send a ZIP file of your project's amplify
directory to amplify-cli@amazon.com?
Hey @catherine-augustine I saw your message, do you have a storage provider you could upload to such as Google Drive?
Hey @catherine-augustine I received your zip file and will be taking a look at it!
Hey @catherine-augustine :wave: I am unable to reproduce with the steps and zip file provided. Can you post the logs from ~/.amplify/logs/amplify-cli-<issue-date>.log
after attempting to push again? On Windows the .amplify/
directory is in your users profile (typically C:\Users\<your-username>\
)
2021-07-26T20:10:58.375Z|info : amplify push core
2021-07-26T20:10:58.529Z|info : amplify-cli-core.banner-message/index.ts.fetch banner messages from https://aws-amplify.github.io/amplify-cli/banner-message.json({}
I just see this, @josefaidt
Hey @catherine-augustine thank you for that information! May you also post the log from the day the original error happened?
Also, to get a better idea of where the error is happening, can we try adding a console.log()
statement in one of the CLI's files' catch block to log the full stack trace?
The file is located at:
code "$(npm root -g)\@aws-amplify\cli\node_modules\amplify-provider-awscloudformation\lib\push-resources.js"
And we'll want to add the console.log in the following try/catch block at line 297
catch (error) {
if (iterativeDeploymentWasInvoked) {
await deploymentStateManager.failDeployment();
}
spinner.fail('An error occurred when pushing the resources to the cloud');
+ console.log(error)
rollbackLambdaLayers(layerResources);
logger('run', [resourceDefinition])(error);
throw error;
}
Afterwards, please try executing amplify push
from your project again and post the stack trace.
I don't see that at all.
"@aws-amplify/cli": "^5.1.0",
"@aws-amplify/core": "^4.1.2",
These are the versions in package.json. Should I update to a higher version?
Also, I dont see the logs with the error that occured first time.
Okay no worries that folder was in a slightly different location on my machine as well. Perhaps it is located at the following path?
$(npm root -g)\amplify-provider-awscloudformation\lib\push-resources.js
I added the console log. Am I missing something? I still dont see the console error . Changed the error description. I didnt see that either on the cli console.
@catherine-augustine can you confirm the Amplify CLI's executable path? On Windows I believe this can be found using where.exe amplify
.
Also, if you're available on Discord we can set up a time for a quick chat!
I edited the function from the console and got it deployed. Though I am not able to push from IDE yet, I am good for now.
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help
channels for those types of questions.
Before opening, please confirm:
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
12.x
Amplify CLI Version
5.1.0
What operating system are you using?
Windows
Amplify Categories
auth, function, api
Amplify Commands
push
Describe the bug
Expected behavior
amplify push to succeed
Reproduction steps
amplify push
and got the error.Package.json contents
GraphQL schema(s)
Log output
Additional information
No response