Using a dotnet core Lambda function to trigger a long running FARGATE task

Introduction

AWS Lambda functions are great for doing small units of work. And not that they support dotnet core 2.0, they’re my go to choice for queue based workloads.¬†However, there are some tasks that will definitely take longer than the 5 minute limit on Lambda functions. For example, if you have a daily batch job that you need to run, and if that job is going to take 30 minutes, or a hour, then how are you going to set up that process? You could do something like setup a stand-alone EC2 instance, create a cron job to trigger it, etc. But then you’re having to manage infrastructure. I’d rather let Amazon worry about that.

FARGATE

Amazon has had docker support for a while, which gets close to solving our server problem. Initially you needed to create EC2 instances and attach them to the Elastic Container Service. More recently they’ve launched FARGATE which is a serverless way to run docker. You just specify the requirements of your task, and FARGATE will manage the infrastructure for you. A typical case is that you want to have a docker enabled website that you’ve built, and you can let FARGATE host it without ever having to provision an EC2 instance.

Continue reading Using a dotnet core Lambda function to trigger a long running FARGATE task

Publishing dotnet core 2.0 lambda functions to AWS via Jenkins

Recently AWS announced that lambda functions now support dotnet core 2.0. This is great news if you’re creating asynchronous functions that are meant to run serverless. There is a lot of good documentation out there on how to get started if you’re using the standard Windows 10 / Visual Studio setup. However, if you’re just getting started with the CLI tools and, like me, are using a Mac (either with VS Code or Visual Studio for Mac), sometimes the documentation is a sparse or is located is disparate locations.

Purpose

In this post, I’ll walk through the steps of getting a lambda function created and deployable via Jenkins. This assumes that you’re already comfortable working on your Mac (or Windows) creating basic dotnet core projects.

Continue reading Publishing dotnet core 2.0 lambda functions to AWS via Jenkins