aws-amplify / amplify-js

A declarative JavaScript library for application development using cloud services.
https://docs.amplify.aws/lib/q/platform/js
Apache License 2.0
9.42k stars 2.13k forks source link

amplify push fails in official AWS Amplify+AppSync+Athena sample app #4331

Closed rkeiii closed 4 years ago

rkeiii commented 4 years ago

Description

When running the AWS provided "Amplify+Appsync+Athena BigData Visualization" sample Amplify (via CloudFormation) gives a 404 error when running "amplify push" after initial run. I originally filed an AWS support (Case ID 6541224261) request and they directed me here after reviewing the issue.

Link to AWS sample app that demonstrates the issue

https://github.com/aws-samples/aws-appsync-visualization-with-athena-app

Steps to reproduce

My environment

rkeiii@athena:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:    18.04
Codename:   bionic
rkeiii@athena:~$ amplify --version
3.15.0
rkeiii@athena:~$ nodejs --version
v10.17.0
rkeiii@athena:~$ npm --version
6.12.1
rkeiii@athena:~$

Example error output from "amplify push" (only occurs on subsequent pushes with a modification present)

rkeiii@athena:~/doozee/workspace/internal/AthenaDataVizApp$ amplify push

Current Environment: dev

| Category | Resource name            | Operation | Provider plugin   |
| -------- | ------------------------ | --------- | ----------------- |
| Api      | appsyncathenaviz         | Update    | awscloudformation |
| Auth     | appsyncathenavizb9ef8f65 | No Change | awscloudformation |
| Function | S3Trigger20d9f806        | No Change | awscloudformation |
| Storage  | sQueryResults            | No Change | awscloudformation |
? Are you sure you want to continue? Yes

GraphQL schema compiled successfully.

Edit your schema at /home/rkeiii/doozee/workspace/internal/AthenaDataVizApp/amplify/backend/api/appsyncathenaviz/schema.graphql or place .graphql files in a directory at /home/rkeiii/doozee/workspace/internal/AthenaDataVizApp/amplify/backend/api/appsyncathenaviz/schema
? Do you want to update code for your updated GraphQL API Yes
? Do you want to generate GraphQL statements (queries, mutations and subscription) based on your schema types? This will overwrite your current graphql queries, mutations and subscriptions Yes
⠼ Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS appsyncathenaviz-dev-20191102210316 AWS::CloudFormation::Stack Sun Nov 03 2019 00:27:19 GMT-0400 (Eastern Daylight Time) User Initiated
UPDATE_IN_PROGRESS authappsyncathenavizb9ef8f65        AWS::CloudFormation::Stack Sun Nov 03 2019 00:27:23 GMT-0400 (Eastern Daylight Time)               
UPDATE_COMPLETE    authappsyncathenavizb9ef8f65        AWS::CloudFormation::Stack Sun Nov 03 2019 00:27:24 GMT-0400 (Eastern Daylight Time)               
⠹ Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS apiappsyncathenaviz AWS::CloudFormation::Stack Sun Nov 03 2019 00:27:26 GMT-0400 (Eastern Daylight Time) 
⠙ Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS appsyncathenaviz-dev-20191102210316-apiappsyncathenaviz-1E1YXAS3DK1YU AWS::CloudFormation::Stack Sun Nov 03 2019 00:27:26 GMT-0400 (Eastern Daylight Time) User Initiated
⠦ Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS GraphQLSchema AWS::AppSync::GraphQLSchema Sun Nov 03 2019 00:27:31 GMT-0400 (Eastern Daylight Time) 
⠴ Updating resources in the cloud. This may take a few minutes...

UPDATE_COMPLETE GraphQLSchema AWS::AppSync::GraphQLSchema Sun Nov 03 2019 00:27:44 GMT-0400 (Eastern Daylight Time) 
⠼ Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS CustomResourcesjson AWS::CloudFormation::Stack Sun Nov 03 2019 00:27:46 GMT-0400 (Eastern Daylight Time) 
⠼ Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS appsyncathenaviz-dev-20191102210316-apiappsyncathenaviz-1E1YXAS3DK-CustomResourcesjson-1G68SRUH0CDK0 AWS::CloudFormation::Stack Sun Nov 03 2019 00:27:47 GMT-0400 (Eastern Daylight Time) User Initiated
⠦ Updating resources in the cloud. This may take a few minutes...

CREATE_IN_PROGRESS DataSourceCustomerAthenaAPI AWS::AppSync::DataSource Sun Nov 03 2019 00:27:51 GMT-0400 (Eastern Daylight Time) 
⠴ Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS          AnnounceQueryResultResolver                                                                          AWS::AppSync::Resolver     Sun Nov 03 2019 00:27:51 GMT-0400 (Eastern Daylight Time)                                                                                                                                                 
UPDATE_IN_PROGRESS          QueryStartQueryResolver                                                                              AWS::AppSync::Resolver     Sun Nov 03 2019 00:27:52 GMT-0400 (Eastern Daylight Time)                                                                                                                                                 
CREATE_IN_PROGRESS          DataSourceCustomerAthenaAPI                                                                          AWS::AppSync::DataSource   Sun Nov 03 2019 00:27:53 GMT-0400 (Eastern Daylight Time) Resource creation Initiated                                                                                                                     
CREATE_COMPLETE             DataSourceCustomerAthenaAPI                                                                          AWS::AppSync::DataSource   Sun Nov 03 2019 00:27:53 GMT-0400 (Eastern Daylight Time)                                                                                                                                                 
UPDATE_FAILED               AnnounceQueryResultResolver                                                                          AWS::AppSync::Resolver     Sun Nov 03 2019 00:27:53 GMT-0400 (Eastern Daylight Time) Type Mutation not found (Service: AWSAppSync; Status Code: 404; Error Code: NotFoundException; Request ID: 3223d41e-9bd2-435e-8caf-4b6c2a1ad7ea)
UPDATE_FAILED               QueryStartQueryResolver                                                                              AWS::AppSync::Resolver     Sun Nov 03 2019 00:27:54 GMT-0400 (Eastern Daylight Time) Resource update cancelled                                                                                                                       
UPDATE_ROLLBACK_IN_PROGRESS appsyncathenaviz-dev-20191102210316-apiappsyncathenaviz-1E1YXAS3DK-CustomResourcesjson-1G68SRUH0CDK0 AWS::CloudFormation::Stack Sun Nov 03 2019 00:27:55 GMT-0400 (Eastern Daylight Time) The following resource(s) failed to update: [AnnounceQueryResultResolver, QueryStartQueryResolver].                                             
⠴ Updating resources in the cloud. This may take a few minutes...

UPDATE_FAILED               CustomResourcesjson                                                   AWS::CloudFormation::Stack Sun Nov 03 2019 00:27:57 GMT-0400 (Eastern Daylight Time) Embedded stack arn:aws:cloudformation:us-west-2:REDACTED:stack/appsyncathenaviz-dev-20191102210316-apiappsyncathenaviz-1E1YXAS3DK-CustomResourcesjson-1G68SRUH0CDK0/5d40baf0-fdd7-11e9-911c-0688c4290cb8 was not successfully updated. Currently in UPDATE_ROLLBACK_IN_PROGRESS with reason: The following resource(s) failed to update: [AnnounceQueryResultResolver, QueryStartQueryResolver]. 
UPDATE_ROLLBACK_IN_PROGRESS appsyncathenaviz-dev-20191102210316-apiappsyncathenaviz-1E1YXAS3DK1YU AWS::CloudFormation::Stack Sun Nov 03 2019 00:27:58 GMT-0400 (Eastern Daylight Time) The following resource(s) failed to update: [CustomResourcesjson].                                                                                                                                                                                                                                                                                                                                   
⠏ Updating resources in the cloud. This may take a few minutes...

UPDATE_FAILED apiappsyncathenaviz AWS::CloudFormation::Stack Sun Nov 03 2019 00:28:00 GMT-0400 (Eastern Daylight Time) Embedded stack arn:aws:cloudformation:us-west-2:REDACTED:stack/appsyncathenaviz-dev-20191102210316-apiappsyncathenaviz-1E1YXAS3DK1YU/4d96df80-fdd7-11e9-a579-0a14cc4f5b48 was not successfully updated. Currently in UPDATE_ROLLBACK_IN_PROGRESS with reason: The following resource(s) failed to update: [CustomResourcesjson]. 
⠼ Updating resources in the cloud. This may take a few minutes...

UPDATE_ROLLBACK_IN_PROGRESS appsyncathenaviz-dev-20191102210316 AWS::CloudFormation::Stack Sun Nov 03 2019 00:28:01 GMT-0400 (Eastern Daylight Time) The following resource(s) failed to update: [apiappsyncathenaviz].
⠼ Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS authappsyncathenavizb9ef8f65 AWS::CloudFormation::Stack Sun Nov 03 2019 00:28:12 GMT-0400 (Eastern Daylight Time) 
UPDATE_COMPLETE    authappsyncathenavizb9ef8f65 AWS::CloudFormation::Stack Sun Nov 03 2019 00:28:12 GMT-0400 (Eastern Daylight Time) 
UPDATE_IN_PROGRESS apiappsyncathenaviz          AWS::CloudFormation::Stack Sun Nov 03 2019 00:28:13 GMT-0400 (Eastern Daylight Time) 
⠹ Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS GraphQLSchema AWS::AppSync::GraphQLSchema Sun Nov 03 2019 00:28:41 GMT-0400 (Eastern Daylight Time) 
⠇ Updating resources in the cloud. This may take a few minutes...

UPDATE_COMPLETE    GraphQLSchema       AWS::AppSync::GraphQLSchema Sun Nov 03 2019 00:28:53 GMT-0400 (Eastern Daylight Time) 
UPDATE_IN_PROGRESS CustomResourcesjson AWS::CloudFormation::Stack  Sun Nov 03 2019 00:28:54 GMT-0400 (Eastern Daylight Time) 
⠇ Updating resources in the cloud. This may take a few minutes...

UPDATE_COMPLETE                              AnnounceQueryResultResolver                                                                          AWS::AppSync::Resolver     Sun Nov 03 2019 00:29:12 GMT-0400 (Eastern Daylight Time) 
UPDATE_IN_PROGRESS                           QueryStartQueryResolver                                                                              AWS::AppSync::Resolver     Sun Nov 03 2019 00:29:13 GMT-0400 (Eastern Daylight Time) 
UPDATE_COMPLETE                              QueryStartQueryResolver                                                                              AWS::AppSync::Resolver     Sun Nov 03 2019 00:29:15 GMT-0400 (Eastern Daylight Time) 
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS appsyncathenaviz-dev-20191102210316-apiappsyncathenaviz-1E1YXAS3DK-CustomResourcesjson-1G68SRUH0CDK0 AWS::CloudFormation::Stack Sun Nov 03 2019 00:29:15 GMT-0400 (Eastern Daylight Time) 
⠇ Updating resources in the cloud. This may take a few minutes...

UPDATE_COMPLETE                              CustomResourcesjson                                                   AWS::CloudFormation::Stack Sun Nov 03 2019 00:29:16 GMT-0400 (Eastern Daylight Time) 
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS appsyncathenaviz-dev-20191102210316-apiappsyncathenaviz-1E1YXAS3DK1YU AWS::CloudFormation::Stack Sun Nov 03 2019 00:29:17 GMT-0400 (Eastern Daylight Time) 
⠙ Updating resources in the cloud. This may take a few minutes...

UPDATE_COMPLETE apiappsyncathenaviz AWS::CloudFormation::Stack Sun Nov 03 2019 00:29:31 GMT-0400 (Eastern Daylight Time) 
⠏ Updating resources in the cloud. This may take a few minutes...

UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS appsyncathenaviz-dev-20191102210316 AWS::CloudFormation::Stack Sun Nov 03 2019 00:29:33 GMT-0400 (Eastern Daylight Time) 
UPDATE_IN_PROGRESS                           apiappsyncathenaviz                 AWS::CloudFormation::Stack Sun Nov 03 2019 00:29:34 GMT-0400 (Eastern Daylight Time) 
⠹ Updating resources in the cloud. This may take a few minutes...

UPDATE_IN_PROGRESS CustomResourcesjson AWS::CloudFormation::Stack Sun Nov 03 2019 00:29:36 GMT-0400 (Eastern Daylight Time) 
⠧ Updating resources in the cloud. This may take a few minutes...

DELETE_IN_PROGRESS       DataSourceCustomerAthenaAPI                                                                          AWS::AppSync::DataSource   Sun Nov 03 2019 00:29:37 GMT-0400 (Eastern Daylight Time) 
DELETE_COMPLETE          DataSourceCustomerAthenaAPI                                                                          AWS::AppSync::DataSource   Sun Nov 03 2019 00:29:39 GMT-0400 (Eastern Daylight Time) 
UPDATE_ROLLBACK_COMPLETE appsyncathenaviz-dev-20191102210316-apiappsyncathenaviz-1E1YXAS3DK-CustomResourcesjson-1G68SRUH0CDK0 AWS::CloudFormation::Stack Sun Nov 03 2019 00:29:39 GMT-0400 (Eastern Daylight Time) 
⠇ Updating resources in the cloud. This may take a few minutes...

UPDATE_COMPLETE          CustomResourcesjson                                                   AWS::CloudFormation::Stack Sun Nov 03 2019 00:29:46 GMT-0400 (Eastern Daylight Time) 
UPDATE_ROLLBACK_COMPLETE appsyncathenaviz-dev-20191102210316-apiappsyncathenaviz-1E1YXAS3DK1YU AWS::CloudFormation::Stack Sun Nov 03 2019 00:29:46 GMT-0400 (Eastern Daylight Time) 
⠹ Updating resources in the cloud. This may take a few minutes...

UPDATE_COMPLETE          apiappsyncathenaviz                 AWS::CloudFormation::Stack Sun Nov 03 2019 00:29:56 GMT-0400 (Eastern Daylight Time) 
UPDATE_IN_PROGRESS       authappsyncathenavizb9ef8f65        AWS::CloudFormation::Stack Sun Nov 03 2019 00:29:56 GMT-0400 (Eastern Daylight Time) 
UPDATE_COMPLETE          authappsyncathenavizb9ef8f65        AWS::CloudFormation::Stack Sun Nov 03 2019 00:29:57 GMT-0400 (Eastern Daylight Time) 
UPDATE_ROLLBACK_COMPLETE appsyncathenaviz-dev-20191102210316 AWS::CloudFormation::Stack Sun Nov 03 2019 00:29:57 GMT-0400 (Eastern Daylight Time) 
⠏ Updating resources in the cloud. This may take a few minutes...Error updating cloudformation stack
⠹ Updating resources in the cloud. This may take a few minutes...

Following resources failed

Resource Name: arn:aws:appsync:us-west-2:REDACTED:apis/ifpd5bfvl5fc5jk2w5os5vvk4q/types/Query/resolvers/startQuery (AWS::AppSync::Resolver)
Event Type: update
Reason: Resource update cancelled
URL: https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/arn%3Aaws%3Acloudformation%3Aus-west-2%3AREDACTED%3Astack%2Fappsyncathenaviz-dev-20191102210316-apiappsyncathenaviz-1E1YXAS3DK-CustomResourcesjson-1G68SRUH0CDK0%2F5d40baf0-fdd7-11e9-911c-0688c4290cb8/events

Resource Name: arn:aws:appsync:us-west-2:REDACTED:apis/ifpd5bfvl5fc5jk2w5os5vvk4q/types/Mutation/resolvers/announceQueryResult (AWS::AppSync::Resolver)
Event Type: update
Reason: Type Mutation not found (Service: AWSAppSync; Status Code: 404; Error Code: NotFoundException; Request ID: 3223d41e-9bd2-435e-8caf-4b6c2a1ad7ea)
URL: https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/arn%3Aaws%3Acloudformation%3Aus-west-2%3AREDACTED%3Astack%2Fappsyncathenaviz-dev-20191102210316-apiappsyncathenaviz-1E1YXAS3DK-CustomResourcesjson-1G68SRUH0CDK0%2F5d40baf0-fdd7-11e9-911c-0688c4290cb8/events

✖ An error occurred when pushing the resources to the cloud

Resource is not in the state stackUpdateComplete
An error occured during the push operation: Resource is not in the state stackUpdateComplete
rkeiii commented 4 years ago

AWS supported pointed out this was an issue with the sample project and not with Amplify itself (at least I don't think so at this point, it's all still somewhat confusing to me).

See pull request here for details: https://github.com/aws-samples/aws-appsync-visualization-with-athena-app/pull/3

github-actions[bot] commented 3 years ago

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 or Discussions for those types of questions.