When a deployment fails the rollback does not clean up everything. Also, if one tries to delete the CloudFormation stack it is still not completely removed.
The issue is that AWS CloudFormation keeps the created log groups. I am quite sure that's intentional, but it's unfortunate, as it does not allow the stack to be rolled out again, because it fails creating these log groups again as they already exist.
Current workaround is to delete these manually, but in that case you also have to know how the name schema is. For the records, it is for remaining log groups:
When a deployment fails the rollback does not clean up everything. Also, if one tries to delete the CloudFormation stack it is still not completely removed.
The issue is that AWS CloudFormation keeps the created log groups. I am quite sure that's intentional, but it's unfortunate, as it does not allow the stack to be rolled out again, because it fails creating these log groups again as they already exist.
Current workaround is to delete these manually, but in that case you also have to know how the name schema is. For the records, it is for remaining log groups:
/${PROJECT_NAME}-${BRANCH_NAME}-${STAGE}/data-log
/aws/lambda/${PROJECT_NAME}-${BRANCH_NAME}-${STAGE}-lambda-handler