As your https://towardsthecloud.com/aws-cdk applications grow, it becomes increasingly important to maintain a well-organized project structure. When working on smaller projects using infrastructure as code, where you deploy single applications that don’t demand extensive maintenance or collaboration from multiple teams, it’s recommended to structure your AWS CDK project in a way that enables you to deploy both the application and infrastructure using a single stack. However, if your use case involves multiple microservices and numerous stateful resources, such as databases within a single AWS CDK application, it’s wise to organize your AWS CDK project to ensure easy extensibility and seamless deployment of the components you’ve built.
Combining stateful and stateless resources in a single stack can lead to challenges when it comes to maintainability as your AWS CDK project grows over time.