Did you know AWS CodeBuild supports Lambda?


Did you know AWS CodeBuild supports Lambda?

Big potential savings with AWS CodeBuild Lambda…. If you can stomach the limitations. 

Gone are the days you need to spin up Docker containers to run your code build tasks. AWS Code Build can now trigger a lambda to fire off and do your various deployment tasks. This is great news for those of you on the Serverless train.

It still supports custom ECR images if you need a little something special to complete your builds.

Limitations:

There are quite a few limitations.

Some of the more interesting ones are that they say “AWS Lambda doesn't support VPC connectivity”. I have not tested it yet but it sounds like if, like several of my clients, you run DB migration scripts during the build process it would NOT be able to connect with a DB running in your VPC. 

No root access, no writing to files outside of the /tmp directory. No GPUs which tracks with lambdas. No caching. No run times longer than 15 minutes.

Pricing:

You get charged per build second that the lambdas are running. There are a variety of lambda sizes that vary in memory size. The lowest starting at $0.00002 and going up to $0.0001. 

Wrapping it up:

I want to do a deeper dive on the pricing calculations and compare my current build charges using the standard Docker container vs a Lambda.

If you can live with the massive limitations then perhaps AWS Code Build Lambda is the way to go. If not just stick with the old standard.

Question for you: How does your deployment pipeline work? Are you considering switching to lambda?