CICD Unit Testing For Serverless Lambda Backend Code

0

I have a CodeCommit repo that houses all resources for the backend part of my app. From API Gateway to Cognito to Lambda, everything is deployed from this repo, which is mostly written in terraform but the lambda functions are written in Python. Every dev has their own branch and we all push to a common branch called dev. Merging with dev puts the pipeline in motion and changes to deployments happens.

Currently there's no manual approval of PRs to merge with dev, but I will like to at least make sure all the unittest are passing before merging can go through to dev. How do I achieve this?

toussyn
asked 2 months ago156 views
1 Answer
1

Hello.

Why not try using the architectures featured on the AWS Blog?
To give you a quick overview, you can catch events with EventBridge based on the pull request action to a branch, run CodeBuild, and perform tests.
I thought it would be a good idea to check the results of this test before merging.
https://aws.amazon.com/jp/blogs/devops/validating-aws-codecommit-pull-requests-with-aws-codebuild-and-aws-lambda/

I think this blog will also be helpful.
https://medium.com/@kpiroddi/creating-a-aws-codecommit-pull-request-workflow-with-terraform-2e57138cef95

profile picture
EXPERT
answered 2 months ago
profile pictureAWS
EXPERT
reviewed 2 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