简体   繁体   中英

How can I deploy aws lambda as jenkins's agent?

I'm going to use Jenkins for CI/CD for the first time in my project. So, I'm using "gitHub hook trigger for GITScm polling" to automatically make the code into a docker image when github pushed, and upload the image to the ECR when passing the test using "pytest".

However, it is burdensome to run the Docker image directly on the Jenkins master server and operate the pytest, so I just want to test the code in aws lambda whenever it is pushed.( in other words, I want to use lambda as Jenkins agent )

I want to implement this process through Jenkins pipeline(Jenkinsfile), but I don't know how. Is there a way to create and deploy aws lambda through the Jenkins pipeline?

What you could try is to use the AWS Lambda Plugin .

It allows you to build and deploy lambdas from Jenkins. So you could create a lambda containg your logic, invoking it and using the result afterwards.

But keep in mind that lambda might not be the right tool for the job. Execution only can take 15 minutes, and I think you are better off using ECS/EKS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM