Amplify-console: Amplify Console - Build Failing - BackendEnvironment already exist

Created on 26 Dec 2019  路  8Comments  路  Source: aws-amplify/amplify-console

Describe the bug
After I made updates to my amplify project. I did amplify push and after the command succeeded, I pushed my code to the repo, which kicks off a build, but the build keeps failing on the amplify console which says the the BackendEnvironment feature already exist. (I was pushing my feature branch, which already has a feature backend env created and I have already built successfully on this backend for dozens of builds).

To Reproduce
Steps to reproduce the behavior:

  1. Make update to my code.
  2. Do amplify status and it show there are categories Updated
  3. Do amplify push and wait util it secceeded.
  4. Push the code to repo (GitHub)
  5. The Build failed and the log is attached

    • as you can see the line 7 already said it found the env feature and at line 11 it want to add the env again

Expected behavior
The build command should not think that I am creating a new backend environment after I push the code. However, it should just update the existing one.

Screenshots
Build Log:
Screen Shot 2019-12-25 at 8 57 24 PM

Additional context
versions:

  • "aws-amplify": "^2.1.0",
  • amplify cli 4.8.0

categories used:

  • Auth
  • Api (GraphQL)
  • DataSource (S3)
  • Function (Lambda)
bug

Most helpful comment

So guys. I am sure Amplify team will deliver a fix for this but the temporary workaround is set the Amplify CLI version to 4.7.0 in Amplify Console -> App Settings -> Build Settings

All 8 comments

Another observation is that in my last succeeded build, amplify was using @aws-amplify/cli 4.7.0 to build my project. However, my first failed build was using 4.8.0 instead..

The last succeeded build (See line 23)
Screen Shot 2019-12-25 at 11 54 17 PM

The first failed build (See line 23)
Screen Shot 2019-12-25 at 11 55 31 PM

There is a recent release (4.8.0) of @aws-amplify/cli here and I guess amplify is set to use the latest version of @aws-amplify/cli.

If this is the case, Is it possible the 4.8.0 version causes this issue?

Actually I was just poking around and found that we can actually set the version of the amplify cli we want to use in the Amplify Console -> App Settings -> Build Settings

Screen Shot 2019-12-26 at 12 22 43 AM

I then set it to 4.7.0 and the builds started to succeded again.

So the version of @aws-amplify/cli is the problem.

So guys. I am sure Amplify team will deliver a fix for this but the temporary workaround is set the Amplify CLI version to 4.7.0 in Amplify Console -> App Settings -> Build Settings

Thanks for the detailed information @RobotCharlie, I will go ahead and move this to the Amplify Console issues for better exposure to fix this.

@jordanranz Thanks!

@RobotCharlie can you try 4.10? This was fixed.

@swaminator Thanks! Sure, I will try it tomorrow! I will let you know.

@swaminator I have verified the 4.10.0 fixed the issue. Thanks!

Was this page helpful?
0 / 5 - 0 ratings