By using AWS re:Post, you agree to the Terms of Use

Structure of Repositories for Resource creation and lambdas


I have a few team members want to work on different parts of a solution architecture. They should be able to create the following resources in their accounts, consume any updates from other team members updates to the whole solution architecture and test.

These are the resources:

  1. EventBridge (1 ESB)
  2. C# Lambdas (6 Lambdas)
  3. Cron Jobs (4 Cron Jobs)
  4. On-Prem client applications (1 JavaScript applicaiton)

This is our SDLC process:

  1. We will use the AWS C# CDK to create the resources and roles.
  2. On-Prem Jenkins to create a CI/CD

To accomplish smooth development and deployment of the projects, what is the recommended way to split the projects into GitHub repositories?

  1. Should the CDK (Infrastructure as Code) to create all the resources be a separate repository? Can this help the developer to deploy the resources in a single execution?
  2. Should the CDK (Infrastructure as Code) to create the resource be part of the lambda or cron job itself?

Any suggestions appreciated.

1 Answer

Perhaps you should consider if all of the lambda functions belong to the same solution/workload, if the answer is yes then the infrastructure (CDK) and lambda functions should be deployed together, if on the other hand you can your code to different individual workloads which can be deployed individually than you should consider multiple repositories. In my opinion all resources that are used to trigger or used by a lambda functions should be deployed along with that function, so that if you make a change to your infrastructure that would also effect your lambda code (for example replacing SNS with SQS) than the code of the lambda should be "synchronized" and deployed with the right version of your infrastrucutre

answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions