I've inherited a project in Serverless and I've never encountered it before and I need some assistance. I've fixed a lot of bugs and errors on the project, but I'm stuck on a single issue that I can't fix.
The previous devs had only 1 git branch (I know it's amazing) and they pushed from that branch to AWS with different configuration files. I'm currently trying to create some git hygiene and create a CI/CD process for the project, but my dev environment won't deploy (qa and prod deploy normally).
Unfortunately I can't provide the serverless.yml nor the specific config files (due to NDA), but I can assure you I've checked the differences between the prod, qa (both work fine) and dev configs and they all have the same parameters (everything else, including the code, is the same). I've checked the resource ARNs in the dev config and they seem to be fine also.
The error I get is:
Serverless Error ----------------------------------------
An error occurred: XXXNestedStack - Embedded stack
arn:aws:cloudformation:ap-south-1:ID:stack/PROJECTNAME-
XXXNestedStack-STACKID was not successfully created: The following resource(s) failed to
create: [XXXLogGroup]. .
I've dealt with CloudFormation stacks being stuck in deletion before and I've tried clearing the whole environment and redeploying everything from scratch, but it still won't go. Have you guys ever encountered something like this and if you have can you maybe give me some insight into what your situation was/is.
I'm really sorry that I can't provide more info about the project nor error, if anyone needs any more info and is willing to help let me know in the comments maybe I can find a way to provide you some info.
P.S. AWS resources that a single env consumes for the project is: Lambda, Dynamo, Chime, Cognito, SM, CloudFormation and SNS (as far as I can see - keep in mind I've inherited this).
CodePudding user response:
It is hard to tell without the actual template, but from the error you get I will first look into the LogGroup:
- Log group names must be unique within a Region for an AWS account.
- Log group names can be between 1 and 512 characters long.
- Log group names consist of the following characters: a-z, A-Z, 0-9, '_'
(underscore), '-' (hyphen), '/' (forward slash), and '.' (period).
Check that you aren't reusing LogGroup names across environments.