I'm making the transition from a Windows server background to working with AWS and serverless architecture, so please bear with me if I ask some basic questions. My company relies heavily on a central RDS (which I might need advice on breaking up) and we have about three or four main web applications that interact with it.
To give you more context:
- App 1 is a CRUD application, directly tied to the RDS, consisting of just under 100 lambdas.
- App 2 is an API that fetches specific data from the RDS on a timer, with fewer than 10 lambdas.
- App 3 is another API that will be set up to listen for new data written to the RDS (this one isn't built yet, but I anticipate it will have only a few lambdas).
Currently, each application lives in its own GitHub repository. My main concern is the .yml files associated with these apps that contain networking information. Should I separate that networking configuration into its own .yml file? Should I be thinking about breaking App 1 into smaller components? I'm worried that with all these resources, one app might interfere with another's infrastructure as code (IaC), especially since updating 100 lambdas for a single change seems inefficient. Any guidance would be greatly appreciated!
1 Answer
You should definitely separate the network layer into its own template. If you're using Terraform, each component should manage its own state file. If you're on CloudFormation, consider using a separate stack for networking. Once everything is set up, your network configuration doesn't change often, and isolating it means it won't affect other deployments or apps. This makes things cleaner and easier to manage.
If we're using serverless.yml for our apps, how can we handle the networking components? Should they still be part of the app's serverless.yml or entirely removed?