AWS Lambdas are, from a technology perspective, a lot like Azure Functions. They provide a simple and cost-effective way to host code in the cloud, and they can respond to a variety of events such as HTTP requests or queue triggers.

Azure DevOps is a platform for hosting projects in the cloud, including task management, source code, builds, and releases.

In this blog post, we will look at marrying AWS Lambdas with Azure DevOps. Normally, much of what we do at Don’t Panic Labs involves Azure DevOps and Azure Functions. But the process for AWS Lambdas isn’t much different.

So why would you use Lambdas with DevOps?

Sometimes the selection of a cloud platform is out of the developer’s hands, or maybe you in general prefer AWS, or maybe there are some specific features in AWS that make it more appealing than Azure. But for whatever reason you might select AWS as your cloud platform (it is the largest cloud platform), Azure DevOps is still a great AML tool to use with AWS.

We still need a pipeline that will build our code, particularly the actual build part. Typically, this pipeline builds the DLLs for our build process. When it comes to using AWS Lambdas, we have to change the paradigm a little by copying all of the source to the output directory. Why? Because doing the AWS Lambda release is easiest if we can just use the “dotnet lambda deploy” command (which requires all of the source).

Go to Builds and create a new build.

Run the build.

After we have the build in place, we are ready to start setting up the release.

Go to Releases and create a new release.

Create an empty release.

You will need to select the artifact and set up the stage.

Add an agent job.

Add a Lambda task.

Configure your AWS Lambda.

As part of setting this up, you will have to set up a service connection. This will need a key/secret for an AWS user.

Once you have this set up, run the release.

After your release completes, check the work in the AWS console. Hopefully you have a successful Lambda deployment.

This process is very similar to what we would do with an Azure Function and DevOps. Probably the biggest change is the copy of the source to the output. After that, the experience should feel familiar.

Full Build YAML

Share This