amplify-cli: Amplify push shows "Error updating cloudformation stack" without specifying the error

Describe the bug I have a stack on Amplify CLI and recently after updating to 4.38.X & 4.39.0, when I’m pushing directly or building it through Amplify Console, it shows these lines:

Updating resources in the cloud. This may take a few minutes...Error updating cloudformation stack
✔ All resources are updated in the cloud

Although it says that the build was successful, there are some errors and the backend environment doesn’t get updated and since there’s no error message, I have a really hard time finding the problem. I even tried --verbose but no luck, so I have to read through my whole backend-config and cloudformations and kind of guess my error.

Amplify CLI Version 4.38.X to 4.39.0

To Reproduce I’m not sure if it’s happening to anyone else or not, but if your stack has some errors, it won’t get updated since 4.38.X version, but you see the successful message. So you should check the last update date on Amplify Console Backend environment, if you’re using it to make sure that your backend environment is really up to date.

Expected behavior It must shows errors like it used to!

Screenshots Amplify console log

Desktop (please complete the following information):

  • OS: Mac
  • Node Version: v14.15.0

Additional context I have already attached an screenshot of Amplify Console, the same thing happens when I push locally except the log is not disfigured like the picture.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 18 (1 by maintainers)

Most upvoted comments

Pretty sure this is an AmplifyCLI issue. Even though the CLI standard output was silent on the issue, I found the following in amplify/logs/:

2020-12-13T17:38:32.414Z|error : amplify-provider-awscloudformation.push-resources.updateCloudFormationNestedStack(["/home/davidg/xxxxxxxxxx/amplify/b$ValidationError: Template format error: Resource name function xxxxxxxxxx-xxx-xxxxxxxx is non alphanumeric.

Where did you find that directory with logs?

my-project-root/amplify/logs

FYI I’m on v4.39.0

It saved the log first time I ran it with --verbose but after that, the same thing happened with another resource and no log this time.

Interesting. I have never run with verbose. That said there is definitely not a log entry for every amplify push I’ve done. Unclear what is the logic used to write logs.

Get Outlook for Androidhttps://aka.ms/ghei36


From: Bardia Navvabian notifications@github.com Sent: Tuesday, December 15, 2020 8:50:39 AM To: aws-amplify/amplify-cli amplify-cli@noreply.github.com Cc: David Grant DavidG@aercoustics.com; Mention mention@noreply.github.com Subject: Re: [aws-amplify/amplify-cli] Amplify push shows “Error updating cloudformation stack” without specifying the error (#6155)

Pretty sure this is an AmplifyCLI issue. Even though the CLI standard output was silent on the issue, I found the following in amplify/logs/:

2020-12-13T17:38:32.414Z|error : amplify-provider-awscloudformation.push-resources.updateCloudFormationNestedStack(["/home/davidg/xxxxxxxxxx/amplify/b$ValidationError: Template format error: Resource name function xxxxxxxxxx-xxx-xxxxxxxx is non alphanumeric.

Where did you find that directory with logs?

my-project-root/amplify/logs

FYI I’m on v4.39.0

It saved the log first time I ran it with --verbose but after that, the same thing happened with another resource and no log this time.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/aws-amplify/amplify-cli/issues/6155#issuecomment-745298117, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AETG67NI4QB7T55WALZJSQLSU5SS7ANCNFSM4UXADQ2Q.

I resolved this by using the default/suggested function name instead of the custom name I’d supplied which contained a hyphen.

Similar issue here. I just did amplify add function, then amplify function build then amplify push and received this error. From the cloudformation events nothing actually happened (no resources created, no activity at all with timestamps corresponding to the push). Verified the function doesn’t exist in lambda.

But amplify status indicates it thinks it’s in sync.

Having the same issue after updating to 4.39.0 Nothing showing up on Cloudformation to help debug what the problem is, no new events are being recorded by the console, so I guess Amplify is not reaching it when I push.