implementing Nested CloudFormation Stacks for EKS Cluster Deployment - Resource Limit Exceeded scenarios
I'm experimenting with I need help solving I'm refactoring my project and I've looked through the documentation and I'm still confused about I'm trying to deploy an Amazon EKS (Elastic Kubernetes Service) cluster using nested CloudFormation stacks, but I'm running into a `ResourceLimitExceeded` behavior during the stack creation. Specifically, the behavior message states: `The total number of resources in a stack has exceeded the limit`. I have set up a parent stack that creates several child stacks for networking, IAM roles, and the EKS cluster itself. The parent stack YAML is as follows: ```yaml AWSTemplateFormatVersion: '2010-09-09' Resources: MyVPC: Type: 'AWS::EC2::VPC' Properties: CidrBlock: '10.0.0.0/16' MyEKSStack: Type: 'AWS::CloudFormation::Stack' Properties: TemplateURL: <url_to_child_stack> Parameters: VpcId: !Ref MyVPC MyNetworkingStack: Type: 'AWS::CloudFormation::Stack' Properties: TemplateURL: <url_to_networking_child_stack> Parameters: VpcId: !Ref MyVPC ``` In my child stacks, I have additional resources such as subnets, security groups, and IAM roles, which I suspect are contributing to the resource limit. I've double-checked the limits for the account and region, and it appears I'm close to the upper threshold for the number of resources per stack. I've tried breaking down the child stacks into even smaller ones, but it's challenging to manage dependencies and outputs between them. I also looked into using AWS CDK as an alternative, but I'm not sure if that would help with the resource limits. Has anyone faced a similar scenario when deploying EKS clusters with nested stacks, and what strategies or best practices do you recommend to avoid hitting these limits? Any insights would be greatly appreciated! I'm working on a web app that needs to handle this. I've been using Yaml for about a year now. I'd love to hear your thoughts on this. Could this be a known issue?