AWS Lamda

What’s serverless?

  • Serverless is a new paradigm in which the developers don’t have to manage servers anymore...

  • They just deploy code

  • They just deploy... functions !

  • Initially... Serverless == FaaS (Function as a Service)

  • Serverless was pioneered by AWS Lambda but now also includes anything that’s managed: “databases, messaging, storage, etc.”

  • Serverless does not mean there are no servers... it means you just don’t manage / provision / see them

Why AWS Lambda

Benefits of AWS Lambda

• Easy Pricing:

  • Pay per request and compute time

  • The free tier of 1,000,000 AWS Lambda requests and 400,000 GBs of compute time

• Integrated with the whole AWS suite of services

• Event-Driven: functions get invoked by AWS when needed

• Integrated with many programming languages

• Easy monitoring through AWS CloudWatch

• Easy to get more resources per function (up to 10GB of RAM!)

• Increasing RAM will also improve CPU and network!

AWS Lambda language support

• Node.js (JavaScript)

• Python

• Java (Java 8 compatible)

• C# (.NET Core)

• Golang

• C# / Powershell

• Ruby

• Custom Runtime API (community supported, for example Rust)

• Lambda Container Image

  • The container image must implement the Lambda Runtime API

  • ECS / Fargate is preferred for running arbitrary Docker images

Example: Serverless Thumbnail creation

Example: Serverless CRON Job

AWS Lambda Pricing

  • You can find overall pricing information here: https://aws.amazon.com/lambda/pricing/

  • Pay per calls:

    • The first 1,000,000 requests are free

    • $0.20 per 1 million requests thereafter ($0.0000002 per request)

  • Pay per duration: (in increments of 1 ms)

    • 400,000 GB-seconds of compute time per month for FREE

    • == 400,000 seconds if the function is 1GB RAM

    • == 3,200,000 seconds if the function is 128 MB RAM

    • After that $1.00 for 600,000 GB-seconds

    => It is usually very cheap to run AWS Lambda so it’s a very popular

Last updated