# Deploy a project composed by several stacks

**URL:** <https://forum.serverless.com/t/deploy-a-project-composed-by-several-stacks/12635>\
**Category:** Serverless Framework\
**Tags:** aws, lambda, cloudformation\
**Created:** [September 23, 2020, 8:04am UTC](https://forum.serverless.com/t/deploy-a-project-composed-by-several-stacks/12635 "2020-09-23T08:04:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gmarino](https://avatars.discourse-cdn.com/v4/letter/g/45deac/32.png) [@gmarino](https://forum.serverless.com/u/gmarino)\
**Post date:** [September 23, 2020, 8:04am UTC](https://forum.serverless.com/t/deploy-a-project-composed-by-several-stacks/12635/1 "2020-09-23T08:04:41Z")

</div>

My project is composed by the following stacks defined through serverless framework:

- tables.yml # DynamoDB tables stack
- userpools.yml # Cognito UserPools stack
- identitypools.yml # Cognito IdentityPools stack
- apigateway.yml # ApiGateway stack
- domain.yml # Route53 stack
- buckets.yml # S3 buckets stack
- foo.yml # Foo API stack
- bar.yml # Bar API stack

Some of these stacks depend on other stack, for example foo and bar stack need apigateway (Fn:Import on RestApiId) and userpool stack (Fn:Import on cognito authorizer).

I decided to split my project in several stack to increase maintenability and I think to be in a right way but I would understand what should be a nice solution to perform in easily way a complete deploy to upload all stacks in respect of all dependencies.

I thought about nested stack as root stack, could be a solution?

---

<div class="post-metadata">

**Author:** ![bfieber](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/bfieber/32/653_2.png) [@bfieber](https://forum.serverless.com/u/bfieber)\
**Post date:** [September 23, 2020, 2:57pm UTC](https://forum.serverless.com/t/deploy-a-project-composed-by-several-stacks/12635/2 "2020-09-23T14:57:36Z")

</div>

Take a look at the tutorial at [Serverless-stack](https://serverless-stack.com/)  
If you can put all your services into a mono-repo, it walks you through setting up the deployment accounting for cross-service dependencies using [Seed.run](https://console.seed.run/)

I’m in the process of migrating all or legacy service repos into a mono-repo for this specific reason.

---

<div class="post-metadata">

**Author:** ![gmarino](https://avatars.discourse-cdn.com/v4/letter/g/45deac/32.png) [@gmarino](https://forum.serverless.com/u/gmarino)\
**Post date:** [September 24, 2020, 6:59am UTC](https://forum.serverless.com/t/deploy-a-project-composed-by-several-stacks/12635/3 "2020-09-24T06:59:02Z")

</div>

Thanks for response. I’ll try to use Seed, it seems very powerful.
