Skip to content
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

Push fails after upgrade from 4.49.0 to 4.50.2 #7310

Closed
4 tasks done
hbj opened this issue May 11, 2021 · 4 comments · Fixed by #7305
Closed
4 tasks done

Push fails after upgrade from 4.49.0 to 4.50.2 #7310

hbj opened this issue May 11, 2021 · 4 comments · Fixed by #7305
Assignees
Labels
api-rest Issues tied to REST APIs bug Something isn't working

Comments

@hbj
Copy link

hbj commented May 11, 2021

Before opening, please confirm:

  • I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
  • I have searched for duplicate or closed issues.
  • I have read the guide for submitting bug reports.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

How did you install the Amplify CLI?

npm i -g @aws-amplify/cli

If applicable, what version of Node.js are you using?

v12.18.4

Amplify CLI Version

4.50.2

What operating system are you using?

Mac

Amplify Categories

Not applicable

Amplify Commands

push

Describe the bug

After upgrading the CLI from 4.49.0 to 4.50.2, if I update a resource and push, the push fails with the following error message:

CREATE_FAILED APIGatewayAuthStack AWS::CloudFormation::Stack Tue May 11 2021 12:21:55 GMT+0100 (Central European Standard Time) Template format error: At least one Resources member must be defined.

I noticed that a new file amplify/backend/api/APIGatewayAuthStack.json with the following content has been created:

{
  "Description": "API Gateway policy stack created using Amplify CLI",
  "AWSTemplateFormatVersion": "2010-09-09",
  "Parameters": {
    "authRoleName": {
      "Type": "String"
    },
    "unauthRoleName": {
      "Type": "String"
    },
    "env": {
      "Type": "String"
    },
    "standupSlackBot": {
      "Type": "String"
    }
  },
  "Conditions": {
    "ShouldNotCreateEnvResources": {
      "Fn::Equals": [
        {
          "Ref": "env"
        },
        "NONE"
      ]
    }
  }
}

If I go back to 4.49.0 and delete that file, then the push works fine.

Expected behavior

Push works.

Reproduction steps

Reproduction might depend on the services you have in your stack. In my case I have a REST API, a GraphQL API, a user pool auth, a couple of functions, 2 DB storages a custom event bus and a custom event bridge.

  1. upgrade the Amplify CLI for a version < 4.50 to 4.50.2
  2. run amplify push --force as described in the documentation (this should work)
  3. update a resource, e.g. a function
  4. run amplify push (this should fail)

GraphQL schema(s)

No response

Log output

No response

Additional information

No response

@cjihrig cjihrig self-assigned this May 11, 2021
@cjihrig cjihrig added api-rest Issues tied to REST APIs bug Something isn't working labels May 11, 2021
@cjihrig
Copy link
Contributor

cjihrig commented May 11, 2021

Thank you for reporting this. Can you please share your REST API's api-params.json file via email at amplify-cli@amazon.com.

@cjihrig cjihrig linked a pull request May 11, 2021 that will close this issue
2 tasks
@rinosamakanata
Copy link

I'm experiencing the same problem with this bug.

@hbj
Copy link
Author

hbj commented May 12, 2021

Thank you for reporting this. Can you please share your REST API's api-params.json file via email at amplify-cli@amazon.com.

Done.

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-rest Issues tied to REST APIs bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants