Multiple AWS Lambda Developers in the same CDK Stack

1

Hello , I have a question regarding the handling of multiple developers working on lambdas inside the CDK . How can this be handled as each developer runs cdk deploy command on our cdk project ,as the lambdas are defined in it but this introduces an issue where we are basically overrdiign each other's changes each time we deploy. We now handle this where we just changed the stack name in the project's CDK so now each developer works in a separate stack , but I want to ask if there is a better solution for this problem as the number of stacks will increase as the team size increases . So is there a better way to handle this issue ?

1 Answer
2

Hi,

One way to handle this is to have separate accounts for reach environment (1 per developer + 1 for integration + 1 for production + etc.) sharing a common code repo where you can use your standard branching strategy to separate the work of the different devs.

This way, each dev can deploy independently via CDK in his account without interfering with others. The code repo (CodeCommit for ex) for CDK and application has to shared across the various accounts.

Of course, to simplify the management of those N accounts, AWS Organizations should be implemented as well.

This strategy works best for pay-as-use architecture (i.e. serverless most often) because the duplicated AWS resources across accounts cost only when they get effectively used.

Best,

Didier

profile pictureAWS
EXPERT
answered 4 days ago
profile picture
EXPERT
reviewed 4 days ago
profile picture
EXPERT
reviewed 4 days 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