serverless-appsync-plugin
serverless-appsync-plugin copied to clipboard
An error occurred: GraphQlApiLogGroup - /aws/appsync/apis/*** already exists.
After updating serverless-appsync-plugin
from version 1.0.8
to 1.1.2
I am gettingthe following error when I deploy:
$ sls deploy -v --package build --stage staging --region us-east-1
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service ******.zip file to S3 (48.41 MB)...
Serverless: Validating template...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
CloudFormation - UPDATE_IN_PROGRESS - AWS::CloudFormation::Stack - ******-staging
CloudFormation - UPDATE_IN_PROGRESS - AWS::S3::Bucket - ServerlessDeploymentBucket
CloudFormation - UPDATE_IN_PROGRESS - AWS::IAM::Role - IamRoleLambdaExecution
CloudFormation - UPDATE_IN_PROGRESS - AWS::AppSync::GraphQLApi - GraphQlApi
CloudFormation - UPDATE_COMPLETE - AWS::AppSync::GraphQLApi - GraphQlApi
CloudFormation - UPDATE_COMPLETE - AWS::IAM::Role - IamRoleLambdaExecution
CloudFormation - UPDATE_IN_PROGRESS - AWS::AppSync::GraphQLSchema - GraphQlSchema
CloudFormation - CREATE_IN_PROGRESS - AWS::Logs::LogGroup - GraphQlApiLogGroup
CloudFormation - CREATE_FAILED - AWS::Logs::LogGroup - GraphQlApiLogGroup <======
CloudFormation - UPDATE_FAILED - AWS::S3::Bucket - ServerlessDeploymentBucket
CloudFormation - UPDATE_FAILED - AWS::AppSync::GraphQLSchema - GraphQlSchema
CloudFormation - UPDATE_ROLLBACK_IN_PROGRESS - AWS::CloudFormation::Stack - ******-staging
CloudFormation - UPDATE_IN_PROGRESS - AWS::AppSync::GraphQLApi - GraphQlApi
CloudFormation - UPDATE_IN_PROGRESS - AWS::S3::Bucket - ServerlessDeploymentBucket
CloudFormation - UPDATE_IN_PROGRESS - AWS::IAM::Role - IamRoleLambdaExecution
CloudFormation - UPDATE_COMPLETE - AWS::IAM::Role - IamRoleLambdaExecution
CloudFormation - UPDATE_COMPLETE - AWS::AppSync::GraphQLApi - GraphQlApi
CloudFormation - UPDATE_IN_PROGRESS - AWS::AppSync::GraphQLSchema - GraphQlSchema
CloudFormation - UPDATE_COMPLETE - AWS::S3::Bucket - ServerlessDeploymentBucket
CloudFormation - UPDATE_COMPLETE - AWS::AppSync::GraphQLSchema - GraphQlSchema
CloudFormation - UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS - AWS::CloudFormation::Stack - ******-staging
CloudFormation - DELETE_COMPLETE - AWS::Logs::LogGroup - GraphQlApiLogGroup
CloudFormation - UPDATE_ROLLBACK_COMPLETE - AWS::CloudFormation::Stack - ******-staging
Serverless: Operation failed!
Serverless: View the full error output: https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stack/detail?stackId=arn%3Aaws%3Acloudformation%3Aus-east-1%3A...
Serverless Error ---------------------------------------
An error occurred: GraphQlApiLogGroup - /aws/appsync/apis/************************* already exists.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
OS: linux
Node Version: 10.14.2
Serverless Version: 1.45.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Exited with code 1
At the same time I updated serverless
from 1.32.0
to 1.45.0
.
Deleting the log group and re-deploy works, but that's not the expected behaviour: We can't delete all the logs each time we deploy a new version.
[UPDATE]: I tested separately upgrades of serverless
and serverless-appsync-plugin
. Confirm that upgrade of serverless
to 1.45.1
works as expected. I get the error when upgrading serverless-appsync-plugin
to 1.1.2
.
@eloypnd I think this is not the first time it happens. There was a breaking change at some point in a recent version I believe. You should not see that error again.
Thanks for your reply @bboure. Can you point me to which version has the breaking point and what should I do to fix it? Because this error keeps happening every time I push new changes to AppSync.
I upgraded from 1.0.9 to 1.1.2 and have this issue now as well.
After removing the loggingRoleArn
and the resource I added for it this error went away.
I ran into this today as well.
I believe this is what @bboure is referring to:
https://github.com/sid88in/serverless-appsync-plugin/pull/220#issuecomment-474201062
It's not a big deal to me if I need to delete the log group, just as long as the AppSync API isn't also deleted.
Sorry for leaving that aside for so long. @eloypnd are you still experiencing this issue?
#220 was indeed what probably caused this. Have you tried the suggested solutions there?
If this is still an issue for many people, please +1 this issue and we can try to find a solution