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?

1 réponse
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
répondu il y a 3 mois
profile pictureAWS
EXPERT
vérifié il y a 3 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions