Serverless on AWS

Author: Tran Tuan Quy

Date: Aug 17, 2019

About Me

  • Full Stack JavaScript Developer

  • I have worked for Pyramid Consulting, NAU Studio

  • Now I am here at Fram^


Contact Me

  • Twitter: #tuanquynet                              

  • Github:

  • Gmail: tuanquynet

Infrastructure as a Service

Platform as a Service

Azure App Service

Container as a Services

Azure Kubernetes Service

Function as a Service

Software as a Service (SaaS)

  • gdrive, onedrive



Which Architecture?

Monolithic Architecture

Microservice Architecture

Serverless Architecture

Serverless App Architecture

serverless !== no server

Serverless Computing

Serverless computing (or serverless for short), is an execution model where the cloud provider (AWS, Azure, or Google Cloud) is responsible for executing a piece of code by dynamically allocating the resources. And only charging for the amount of resources used to run the code.

Serverless on AWS

Cold Start and Hot Start

Scale By Request

Lambda Instance


Lambda Instance

Lambda Instance

Lambda Instance




Charge by Execution Time

Lambda Instance


Lambda Instance

Lambda Instance

Lambda Instance








How to trigger lambda execution

How to log/monitor lambda?

CloudWatch Logs

CloudWatch Metric

CloudWatch Alarm

Reuse exist lambda using AWS Serverless Application Repository


Runtime on AWS

Configuring Memory & Timeout

Configuring Concurrency

Configuring Env Variables

Configuring Network & Security

Configuring Execution Role

Configuring Inline Policy

Pros and Cons


  • Pay for execution time

  • Reduce cost of DevOps

  • Faster Release

  • Easy to scale


  • Reduce overall control

  • Testing locally is tricky

  • Interactive debug is difficult

  • Vendor lock-in

  • Security risk

Best Practices

  • Don't use to UI deployment

  • Handle timeout by ourselves

  • Close DB connection whenever you no longer use

  • Apply VPC to protect lambda from outside access

  • Use inline policy with only mandatory permissions.


Play Game


Bear in mind

Use the right tool for the right job

Reference Document


Thank You!


By Quy Tran

Loading comments...

More from Quy Tran