Microservice Architecture on AWS
using AWS Lambda
and Docker Containers
Danilo Poccia ‒ AWS Technical Evangelist
@danilop
Why Microservices?
http://en.wikipedia.org/wiki/Multitier_architecture
As a Project scales Complexity arises
“Complexity arises when the
dependencies among the elements
become important.”
Complex Adaptive Systems:
An Introduction to Computational Models of Social Life
Scott E. Page, John H. Miller
How to design

smaller services?
Business Domain
+
Loosely Coupled
+
Bounded Context
Microservices
Independent Deployment
Microservices
Choose the Right Tool
Microservices
Adopt New Technologies
Microservices
Culture of Automation
Adrian Cockcroft, Technology Fellow at Battery Ventures
http://www.slideshare.net/adriancockcroft/goto-berlin
How small is small?
“something that could be
rewritten in two weeks”
Two Pizza Teams
Conway’s law
“organizations which design systems ...
are constrained to produce designs which
are copies of the communication
structures of these organizations”
Melvin Conway, 1968
Architecture
DevOps
M
icroservices
Distributed Systems
Independent Scalability
Auto Scaling
Security
Least Privileges
Single Sign-On
Confused Deputy Problem
(for downstream calls
after authentication)
Testing
Automate
Service Tests
End-to-end Tests
Synthetic Monitoring
Monitoring
Expose Service Metrics
Standard Log Format
Correlation ID
From Log collection to
Real-Time Event Routing
Amazon CloudWatch Logs
Amazon Kinesis
Understand your Trends
Discovery
Self-Describing System
Amazon Route 53
(DNS)
AWS Resource
Tagging
Deployment Pipeline
Developer
Developer
Developer
Developer
Developer
Build
Stage #1 Stage #2 … Stage #N Production
Build Build Build Build
Developer
Developer
Developer
Developer
Developer
Build
Stage #1 Stage #2 … Stage #N Production
Build Build Build Build
Bug!
Developer
Developer
Developer
Developer
Developer
Build
Stage #1 Stage #2 … Stage #N Production
Build Build Build Build
Build Build Build Build Build
Build Build Build Build Build
Developer
Developer
Developer
Developer
Developer
Build
Stage #1 Stage #2 … Stage #N Production
Build Build Build Build
Bug!
Build Build Build Build Build
Build Build Build Build Build
Design for Failure
Degrade Functionality
"Jtecul" by own - Own work.
Licensed under CC BY-SA 3.0 via Wikimedia Commons
http://commons.wikimedia.org/wiki/File:Jtecul.jpg#/media/File:Jtecul.jpg
Circuit Breakers
Elastic
Load Balancing
Health
Checks
Service
Consumer(s)
Consumer(s)
Amazon Route 53
Private DNS in VPC
Health
Checks
Service
Consumer(s)
Consumer(s)
Amazon Route 53
Private DNS in VPC
Elastic
Load Balancing
Health
Checks
Service
Consumer(s)
Consumer(s)
Disposable Infrastructure
Immutable Deployments
Why Docker?
Virtual Machine Container
Docker on AWS
Amazon
Linux
A supported and
maintained Linux
image provided by
Amazon Web Services
Amazon EC2
Container
Service
Highly scalable, high
performance container
management service
AWS
Elastic
Beanstalk
For deploying and
scaling web
applications and
services
Amazon EC2 Container Service
Key Components
Container Instances
Clusters
Tasks
Task Definitions
Amazon EC2 instances
Docker daemon
Amazon ECS agent
https://github.com/aws/amazon-ecs-agent
Amazon EC2 Container Service
Key Components
Container Instances
Clusters
Tasks
Task Definitions
Regional
Resource pool
Grouping of Container Instances
Start empty, dynamically scalable
Amazon EC2 Container Service
Key Components
Container Instances
Clusters
Tasks
Task Definitions
Unit of work
Grouping of related Containers
Run on Container Instances
Amazon EC2 Container Service
Key Components
Container Instances
Clusters
Tasks
Task Definitions
[
{
"image": "mysql",
"name": "db",
"cpu": 10,
"memory": 500,
…
Tasks are defined via Task Definitions
[
{
"image": "tutum/wordpress-stackable",
"name": "wordpress",
"cpu": 10,
"memory": 500,
"essential": true,
"links": [
"db"
],
"entryPoint": [
"/bin/sh",
"-c"
],
"environment": [
…
],
"portMappings": [
{
"containerPort": 80,
"hostPort": 80
}
]
},
{
"image": "mysql",
"name": "db",
"cpu": 10,
"memory": 500,
"essential": true,
"entryPoint": [
"/entrypoint.sh"
],
"environment": [
{
"name": "MYSQL_ROOT_PASSWORD",
"value": "pass"
}
],
"portMappings": []
}
]
[
{
"image": "tutum/wordpress-stackable",
"name": "wordpress",
"cpu": 10,
"memory": 500,
"essential": true,
"links": [
"db"
],
"entryPoint": [
"/bin/sh",
"-c"
],
"environment": [
…
],
"portMappings": [
{
"containerPort": 80,
"hostPort": 80
}
]
},
]
{
"image": "mysql",
"name": "db",
"cpu": 10,
"memory": 500,
"essential": true,
"entryPoint": [
"/entrypoint.sh"
],
"environment": [
{
"name": "MYSQL_ROOT_PASSWORD",
"value": "pass"
}
],
"portMappings": []
}
]
From Docker Hub
10 CPU Units (1024 is full CPU),
500 Megabytes of Memory
Environment Variables
No external ports exposed
Tasks are defined via Task Definitions
[
{
"image": "tutum/wordpress-stackable",
"name": "wordpress",
"cpu": 10,
"memory": 500,
"essential": true,
"links": [
"db"
],
"entryPoint": [
"/bin/sh",
"-c"
],
"environment": [
…
],
"portMappings": [
{
"containerPort": 80,
"hostPort": 80
}
]
},
[
{
"image": "mysql",
"name": "db",
"cpu": 10,
"memory": 500,
"essential": true,
"entryPoint": [
"/entrypoint.sh"
],
"environment": [
{
"name": "MYSQL_ROOT_PASSWORD",
"value": "pass"
}
],
"portMappings": []
}
]
Essential to our Task
Docker link to mysql container
Expose port 80 in container
to port 80 on host
Tasks are defined via Task Definitions
Why AWS Lambda?
AWS Lambda
Event driven,
fully managed compute
AWS Lambda
Focus on business logic,
not infrastructure
Customer uploads code,
AWS Lambda handles:
Capacity
Scaling
Deployment
Fault tolerance
Monitoring
Logging
. . .
AWS Lambda
Automatic scaling
Customers pay only
for what they use,
no over/under provisioning
AWS Lambda
Fine-grained pricing
Price compute time by 100ms,
even short jobs make sense
Low request charge
No hourly, daily, or monthly minimums
Free tier
Events come in many different shapes & sizes
S3 event
notifications
DynamoDB
Streams
Kinesis events Custom
events
Amazon EC2 Containers AWS LambdaOn-Premises
Weeks Minutes Seconds Milliseconds
Netflix Architecture
Asgard, Amimator, Hystrix,
Cassandra, JVM, Docker, …
O
n
AW
S
Microservice Architecture on AWS using AWS Lambda and Docker Containers
Hailo Architecture
Hubot, Janky, Jenkins,
Go, RabbitMQ, Cassandra,
Docker, …
O
n
AW
S
Microservice Architecture on AWS using AWS Lambda and Docker Containers
Demo Architecture
Content Management System
Prototype
O
n
AW
S
Lambda
Function
S3 Bucket

#1
S3 Bucket

#2
DynamoDB

Table
ECS

Task
ECS

Cluster
Images
+

Medatada
Upload Object
+ Metadata
Event
Notification
Thumbnail
Write
Metadata
Run
Schedule
Read
Metadata
Write
“index.html”
1
2
3
<demo>
…
</demo>
Iterate
Continuous Improvement
Kaizen
@danilop

More Related Content

PDF
Microservices on AWS using AWS Lambda and Docker Containers
PDF
AWS Lambda
PDF
AWS Lambda
PDF
Serverless Applications on AWS
PDF
AWS Lambda from the Trenches
PPT
Aws Lambda Cart Microservice Server Less
PDF
Build a Server-less Event-driven Backend with AWS Lambda and Amazon API Gateway
PPTX
DevOps, Microservices and Serverless Architecture
Microservices on AWS using AWS Lambda and Docker Containers
AWS Lambda
AWS Lambda
Serverless Applications on AWS
AWS Lambda from the Trenches
Aws Lambda Cart Microservice Server Less
Build a Server-less Event-driven Backend with AWS Lambda and Amazon API Gateway
DevOps, Microservices and Serverless Architecture

Similar to Microservice Architecture on AWS using AWS Lambda and Docker Containers (17)

PPTX
Tech connect aws
PDF
Infrastructure as Code: Manage your Architecture with Git
PPTX
Introduction to Amazon EC2 Container Service and setting up build pipeline wi...
PDF
AWS re:Invent re:Cap - 배포를 더욱 손쉽고 빠르게: Amazon EC2 Container Service - 김일호
PDF
EC2 Container Service
PDF
Connect + Docker + AWS = Bitbucket Pipelines
PDF
Aws microservice keynote
PPTX
Weave User Group Talk - DockerCon 2017 Recap
PPTX
Introduction to DevOps on AWS
PDF
Google Cloud Platform and Kubernetes
PDF
From Docker Straight to AWS
PDF
Amazon ECS (March 2016)
PPTX
2019 04 Containers - The secret to shipping cloud workloads
PPTX
Drilett aws vpc_presentation_shared
PPTX
Containers on AWS
PDF
Deploying Data Science with Docker and AWS
PPTX
Techdays SE 2016 - Micros.. err Microcosmos
Tech connect aws
Infrastructure as Code: Manage your Architecture with Git
Introduction to Amazon EC2 Container Service and setting up build pipeline wi...
AWS re:Invent re:Cap - 배포를 더욱 손쉽고 빠르게: Amazon EC2 Container Service - 김일호
EC2 Container Service
Connect + Docker + AWS = Bitbucket Pipelines
Aws microservice keynote
Weave User Group Talk - DockerCon 2017 Recap
Introduction to DevOps on AWS
Google Cloud Platform and Kubernetes
From Docker Straight to AWS
Amazon ECS (March 2016)
2019 04 Containers - The secret to shipping cloud workloads
Drilett aws vpc_presentation_shared
Containers on AWS
Deploying Data Science with Docker and AWS
Techdays SE 2016 - Micros.. err Microcosmos
Ad

More from Danilo Poccia (20)

PDF
Get Value from Your Data
PDF
Building Event-Driven Serverless Applications
PDF
Connecting the Unconnected: IoT Made Simple
PDF
Building Event-driven Serverless Apps
PDF
An Introduction to AWS IoT
PDF
Event-driven (serverless) Applications
PDF
Machine Learning for Developers
PDF
Masterclass Advanced Usage of the AWS CLI
PDF
Cloud-powered Mobile Apps
PDF
Get Value From Your Data
PDF
Amazon Elastic File System (Amazon EFS)
PDF
AWS Mobile Hub Overview
PDF
Data Analytics on AWS
PDF
Managing Containers at Scale
PDF
Amazon API Gateway and AWS Lambda: Better Together
PDF
Amazon Aurora Let's Talk About Performance
PDF
Build a Server-less Event-driven Backend with AWS Lambda and Amazon API Gateway
PDF
Amazon Aurora: Amazon’s New Relational Database Engine
PDF
Infrastructure as Code: Manage your Architecture with Git
PDF
Building a Scalable and Highly Available Web Service with AWS: A Live Demo
Get Value from Your Data
Building Event-Driven Serverless Applications
Connecting the Unconnected: IoT Made Simple
Building Event-driven Serverless Apps
An Introduction to AWS IoT
Event-driven (serverless) Applications
Machine Learning for Developers
Masterclass Advanced Usage of the AWS CLI
Cloud-powered Mobile Apps
Get Value From Your Data
Amazon Elastic File System (Amazon EFS)
AWS Mobile Hub Overview
Data Analytics on AWS
Managing Containers at Scale
Amazon API Gateway and AWS Lambda: Better Together
Amazon Aurora Let's Talk About Performance
Build a Server-less Event-driven Backend with AWS Lambda and Amazon API Gateway
Amazon Aurora: Amazon’s New Relational Database Engine
Infrastructure as Code: Manage your Architecture with Git
Building a Scalable and Highly Available Web Service with AWS: A Live Demo
Ad

Recently uploaded (20)

PDF
4K Video Downloader Crack + License Key 2025
PPTX
Relevance Tuning with Genetic Algorithms
PDF
Module 1 - Introduction to Generative AI.pdf
PPTX
Beige and Black Minimalist Project Deck Presentation (1).pptx
PDF
C language slides for c programming book by ANSI
PDF
Science is Not Enough SPLC2009 Richard P. Gabriel
PPTX
SQL introduction and commands, SQL joining
PDF
OpenImageIO Virtual Town Hall - August 2025
PDF
How to Write Automated Test Scripts Using Selenium.pdf
PDF
OpenEXR Virtual Town Hall - August 2025
PPTX
oracle_ebs_12.2_project_cutoveroutage.pptx
PPTX
MCP empowers AI Agents from Zero to Production
PPTX
Comprehensive Guide to Digital Image Processing Concepts and Applications
PPTX
UNIT II: Software design, software .pptx
PDF
WhatsApp Chatbots The Key to Scalable Customer Support.pdf
PDF
OpenTimelineIO Virtual Town Hall - August 2025
PPT
chapter01_java_programming_object_oriented
PDF
KidsTale AI Review - Create Magical Kids’ Story Videos in 2 Minutes.pdf
PDF
solman-7.0-ehp1-sp21-incident-management
PPTX
opentower introduction and the digital twin
4K Video Downloader Crack + License Key 2025
Relevance Tuning with Genetic Algorithms
Module 1 - Introduction to Generative AI.pdf
Beige and Black Minimalist Project Deck Presentation (1).pptx
C language slides for c programming book by ANSI
Science is Not Enough SPLC2009 Richard P. Gabriel
SQL introduction and commands, SQL joining
OpenImageIO Virtual Town Hall - August 2025
How to Write Automated Test Scripts Using Selenium.pdf
OpenEXR Virtual Town Hall - August 2025
oracle_ebs_12.2_project_cutoveroutage.pptx
MCP empowers AI Agents from Zero to Production
Comprehensive Guide to Digital Image Processing Concepts and Applications
UNIT II: Software design, software .pptx
WhatsApp Chatbots The Key to Scalable Customer Support.pdf
OpenTimelineIO Virtual Town Hall - August 2025
chapter01_java_programming_object_oriented
KidsTale AI Review - Create Magical Kids’ Story Videos in 2 Minutes.pdf
solman-7.0-ehp1-sp21-incident-management
opentower introduction and the digital twin

Microservice Architecture on AWS using AWS Lambda and Docker Containers