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
gefragt vor 3 Monaten173 Aufrufe
1 Antwort
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
EXPERTE
beantwortet vor 3 Monaten
profile pictureAWS
EXPERTE
überprüft vor 3 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen