#Resource of type LogGroup already exists

4 messages · Page 1 of 1 (latest)

valid maple
#

I'm trying to redeploy an existing Amplify gen 2 app that has been happily deployed and being redeployed frequently for 12+ months. I just upgraded some packages to these versions:

"@aws-sdk/client-ses": "^3.821.0",
"aws-amplify": "^6.15.0",
"aws-sdk": "^2.1692.0",

DevDependencies
"@aws-amplify/backend": "^1.16.1",
"@aws-amplify/backend-cli": "^1.7.2",

On deploy it now complains:

Resource of type 'AWS::Logs::LogGroup' with identifier '{"/properties/LogGroupName":"/aws/lambda/amplify-..."}' already exists.

I've tried manually deleting the named log groups from CloudWatch, but the problem remains. Any ideas?

valid maple
#

Reverting my packages back to the previous successful deployment makes no difference:

"aws-amplify": "^6.12.3",
"aws-sdk": "^2.1692.0",

DevDependencies
"@aws-amplify/backend": "^1.14.0",
"@aws-amplify/backend-cli": "^1.4.9",

valid maple
#

The "likely root cause" of my latest failed deployment is listed as follows:

Resource handler returned message: "Resource of type 'AWS::Logs::LogGroup' with identifier '{"/properties/LogGroupName":"/aws/lambda/amplify-d2xabcdefgh123-ma-myFunctionNamelambdaC044-bwWadM1hi43h"}' already exists." (RequestToken: 886b0cfa-35d1-5c0b-c1be-40911f749e17, HandlerErrorCode: AlreadyExists)

Worth noting that my sandbox happily deploys at the moment.

Given that this function has been deployed for some time, why would an existing log group relating to it block deployment?

Another example of a subsequent deploy:

"Resource of type 'AWS::Logs::LogGroup' with identifier '{"/properties/LogGroupName":"/aws/lambda/amplify-d2xabcdefgh123-ma-AmplifyBranchLinkerCusto-21e4FKRlRQQF"}' already exists." (RequestToken: 265d0c61-a6da-fdd2-419c-0f3476216bc8, HandlerErrorCode: AlreadyExists)

I'm not sure what "AmplifyBranchLinkerCusto" is related to, but it's not something that I created

valid maple
#

Further info; if I deploy my feature branch it succeeds. So is my deployment stack for main branch corrupted somehow?