Skip to content

unable to run amplify rebuild api after successfully pushing a GraphQL API #964

@josefaidt

Description

@josefaidt

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.
  • I have removed any sensitive information from my code snippets and submission.

How did you install the Amplify CLI?

pnpm

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

18

Amplify CLI Version

10.4.0

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.

n/a

Amplify Categories

api

Amplify Commands

Not applicable

Describe the bug

After successfully deploying an updated version of my schema I am not able to then execute amplify rebuild api. This was noticed during a reproduction where a developer wanted a clean slate to work with in their environment.

Project ID: 0416b6debb44f3bd947ae78cb1b2b07f

➜  amplify rebuild api
⚠️ This will recreate all tables backing models in your GraphQL API 10857.
⚠️ ALL EXISTING DATA IN THESE TABLES WILL BE LOST.
✔ Type the name of the API to confirm you want to continue · 10857
⠇ Building resource api/10857✅ GraphQL schema compiled successfully.

Edit your schema at /Users/josef/Documents/projects/aws-amplify/reproductions/10857/amplify/backend/api/10857/schema.graphql or place .graphql files in a directory at /Users/josef/Documents/projects/aws-amplify/reproductions/10857/amplify/backend/api/10857/schema

Deployment completed.
Deploying api 10857 [ ===------------------------------------- ] 1/13
        GraphQLAPITransformerSchema3C… AWS::AppSync::GraphQLSchema    UPDATE_COMPLETE    

Rolled back (2 of 1)
🛑 ["Index: 0 State: {\"deploy\":\"waitingForDeployment\"} Message: Resource is not in the state stackUpdateComplete"]

Expected behavior

amplify rebuild api should always pass or fail with an appropriate message

Reproduction steps

  1. amplify init -y
  2. amplify add api > GraphQL > add a few auth mechanisms
  3. add schema (see project ID)
  4. amplify push -y
  5. amplify rebuild api
  6. observe error

GraphQL schema(s)

# Put schemas below this line

Log output

# Put your logs below this line


Additional information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions