Aws 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 76

Containers on AWS

A Journey to Modern Applications

Johannes Langer, Senior Solutions Architect, AWS

June 2019

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
The new normal: companies are increasingly
global and products are increasingly digital

47% 79% 67%


of CEOs said they are of CIOs believe that of all business leaders
being challenged by digital business is believe that they
the board of directors making their IT must pick up the pace
to make progress in organizations better of digitalization to
digital business prepared to change remain competitive

Source: Gartner
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
To maintain competitive advantage, digital
businesses must innovate as rapidly as possible
Experiment

Innovation
Flywheel

Ideas Feedback

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Architectural patterns
What changes
have to be made Operational model
in this new world? Software delivery

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Changes to the architectural patterns

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
When the impact of change is small,
release velocity can increase

Monolith Microservices
Does everything Do one thing

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Microservices architectures

API
Gateway
Account Account DB
Mobile
Lookup
client

IoT Shipping DB
Shipment
Query

Client
Store Front
Inventory DB
Web App
Inventory
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Query
Cloud-native architectures are
small pieces, loosely joined

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Changes to the operational model

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Isn’t all of this very hard now that
we have lots of pieces to operate?

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
AWS operational responsibility models

Less More

On-Premises Cloud

Compute Virtual Machine


EC2 Elastic Beanstalk Fargate AWS Lambda

Databases MySQL MySQL on EC2


RDS MySQL RDS Aurora Aurora Serverless DynamoDB

Storage Storage
S3

Messaging ESBs
Amazon MQ Kinesis SQS / SNS

Analytics
Hadoop Hadoop on EC2 EMR Elasticsearch Service Athena

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
What is serverless?

No infrastructure provisioning, Automatic scaling


no management

Pay for value Highly available and secure

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
COMPUTE

AWS AWS
Lambda Fargate

DATA STORES

Amazon Amazon Aurora Amazon


S3 Serverless DynamoDB

INTEGRATION

Amazon Amazon Amazon AWS AWS


API Gateway SQS SNS Step Functions AppSync

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Changes to the delivery of software

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
How do I develop and deploy
code in a serverless microservices
architecture?

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Microservice development lifecycle
developers services delivery pipelines

build test release monitor

build test release monitor

build test release monitor

build test release monitor

build test release monitor

build test release monitor

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
(microservices, 2 pizza teams)

Best practices

(governance, templates)

© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Containers are the best on ramp
towards modern applications

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Application environment components

Runtime Engine Code

Dependencies Configuration

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Different environments

Local Laptop Staging / QA Production On-Prem

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
It worked on my machine, why not in prod?

v6.0.0 v7.0.0 v4.0.0 v7.0.0

Local Laptop Staging / QA Production On-Prem

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Docker to the rescue

Runtime Engine

Dependencies

Code

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Four environments, same container

Local Laptop Staging / QA Production On-Prem

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Why are enterprises
adopting containers?
• Accelerate software development
• Build modern applications
• Automate operations at web scale

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Make AWS the BEST PLACE to run ANY
containerized applications

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Helping customers scale containers

450+% Hundreds of millions


growth of containers started each week

of millions
of container instances

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Typical use cases

• Microservices: Java, Node.js, Go, Web Apps, etc.


• Continuous Integration and Continuous Deployment (CICD)
• Batch Processing and ETL jobs
• Common PaaS Stack for Application Deployment
• Legacy Application Migration to the Cloud
• Hybrid Workloads
• AI/ML
• Scale Testing
• Backend for IoT use cases

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
AWS container services landscape

Amazon Elastic
Management Amazon Elastic
Container Service
Deployment, Scheduling, Container Service
for Kubernetes
Scaling & Management of
containerized applications

Hosting Amazon EC2 AWS Fargate


Where the containers run

Image Registry Amazon Elastic


Container Image Repository Container Registry

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Amazon Elastic
Container Service

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Scheduling and Orchestration
ECS

Cluster Manager Placement Engine

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
McDonald’s Home Delivery: Why Amazon ECS?

Speed to market

Scalability and reliability

Security

DevOps—CI / CD

Monitoring

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
AWS Fargate

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Without Fargate, you end up managing more than just containers

EC2 Instance

Docker ECS
OS
Agent Agent

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
- Patching and Upgrading OS, agents, etc.

- Scaling the instance fleet for optimal utilization

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Amazon Elastic Container Service

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Amazon Elastic Container Service

AWS Fargate
run serverless containers

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
AWS Fargate

Managed by AWS
No EC2 Instances to provision, scale or manage

Elastic
Scale up & down seamlessly. Pay only for what you use
Your
containerized
applications
Integrated
with the AWS ecosystem: VPC Networking, Elastic Load
Balancing, IAM Permissions, CloudWatch and more

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Fully managed container environment
with AWS ECS + Fargate

Bring existing code Production ready Powerful integrations


No changes required of existing ISO, PCI, HIPAA, SOC compliant. Native AWS integrations for
code, works with existing Launch ten or tens of thousands networking, security, CICD,
workflows and microservices of containers in seconds in 9 monitoring, and tracing
built on Amazon ECS global regions (+7 in 2018)

Fargate runs tens of millions of containers for AWS customers every week

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
migrated ~850 applications running in ~5000 containers
to Fargate to reduce the undifferentiated heavy lifting
that came with managing Kubernetes

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
AWS Fargate customers

“We moved to Fargate because we


need the ability to scale quickly up
from baseline and get fine-grained
network control, without having to
manage our own infrastructure”

Product Hunt

”We don't want to babysit


any clusters. That has
nothing to do with us”

Shimon Tolts
CTO, DATREE

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Amazon Elastic
Container Service for Kubernetes

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
What is Kubernetes?

Gives you primitives


Open source container Helps you run
for building modern
management platform containers at scale
applications

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Community, contribution, choice

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
But where you run Kubernetes matters

Quality of the Quality of the


Your users
cloud platform applications

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
—CNCF survey

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Kubectl mycluster.eks.amazonaws.com

Availability Availability Availability


Zone 1 Zone 2 Zone 3

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
EKS is Kubernetes certified

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
How are customer using Amazon EKS?

PaaS

Microservices Platform-as-a-Service Enterprise App Machine Learning


Migration

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Customers adopting Kubernetes on AWS

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Customer example: Snap

100% on Kubernetes in the cloud


Moving core messaging architecture to AWS and EKS
Currently monolithic, breaking this into SOA and microservices

“Undifferentiated Heavy Lifting is work that we have to do that


doesn’t directly benefit our customers. It’s just work. EKS frees us up
to worry about delivering customer value and allows developers
without operational experience to innovate without having to know
where their code runs.”
More detailed talk: AWS New York Summit 2018 - Run Kubernetes with Amazon EKS (SRV318)

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Amazon container services

AWS Fargate

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
THANK YOU! Questions?
https://aws.amazon.com/containers

[email protected]

@johlanger

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Rich partner ecosystem
Monitoring &
Foundation DevOps Logging Security Networking

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
New: AWS Cloud Map

Service discovery for all your cloud resources


Constantly monitor the health of every resource
Dynamically update the location of each microservice

Increase developer productivity


AWS Single registry for all app resources
Cloud Define resources with user-friendly names
Map
Integration with Amazon container services
AWS Fargate
Amazon ECS
Amazon EKS

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
New: AWS App Mesh
Observability & traffic control
Easily export logs, metrics, and traces
Client side traffic policies—circuit breaking, retries
Routes for deployments
Works across clusters and container services
Amazon ECS
Amazon EKS
Kubernetes on EC2
AWS Fargate (coming soon!)

AWS built and run


No control plane to manage
Ease of operations
High scale

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Container Customers

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Fidelity Investments
EKS Reference Customers: SNAP Inc
Appcard

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
EKS Reference Customer: Fidelity Investments

“We built the next generation of our PaaS using EKS for large
enterprise workloads. We manage thousands of applications
and have hundreds of DevOps teams.”
Amr Abdelhalem, Head of Cloud Architecture

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
EKS Reference Customer: SNAP

“Snapchat serves millions of people around the world every


day, and we're thrilled to now leverage Amazon EKS as a core
compute service that can meet our needs now, as well as
upcoming plans to host several critical workloads in the
coming months.”
Alex Strand, Senior Director of Engineering, Snap Inc

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
EKS Reference Customer: Appcard

“Kubernetes is fast becoming the preferred solution for container


orchestration. Its biggest downside is that it is not simple to set
up and operate. EKS gives us all the benefits of Kubernetes, but
takes care of managing the hard stuff. We can dedicate less
resources to deployment and operations as result.”
Amichay Oren, Co-founder & CTO, AppCard Inc

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Turner Broadcasting
Fargate Reference Customers: 99Designs
Harry’s Razors

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Fargate Reference Customer: Turner Broadcasting

“The Cloud Architecture team begin


building tooling around Fargate to
accelerate the adoption and the move to
this new DevOps world. The result ended
up with reduce cost and time.”
Joseph Bulger, Principal Architect
Turner Broadcasting System

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Fargate Reference Customer: 99Designs

“We moved to Fargate to reduce operational burden and


operational costs. Fargate made running Docker containers
easy, removing need to maintain instances.”
Robert McNeil, Sr. Engineer, 99designs

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Fargate Reference Customer: Harry’s Razors

“With Fargate we eliminated EC2 instances, sizing


concerns, instance profiles and policies. Directly
leveraging service auto scaling and target tracking
policies, migrating without any downtime and
simplifying our overall system.”
Bryce Lohr, Technical Lead, Core Services, Harry’s

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Introduction to Containers and
Docker

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Application environment components

Runtime Engine Code

Dependencies Configuration

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Different environments

Local Laptop Staging / QA Production On-Prem

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
It worked on my machine, why not in prod?

v6.0.0 v7.0.0 v4.0.0 v7.0.0

Local Laptop Staging / QA Production On-Prem

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
It worked on my machine, why not in prod?

v6.0.0 v7.0.0 v4.0.0 v7.0.0

Local Laptop Staging / QA Production On-Prem

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Docker to the rescue

Runtime Engine

Dependencies

Code

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Docker container image

Read only image that is used as a

W
rit
template to launch a container.

ab
le
ad
Container

d
ng
Start from base images that have

ix
ad
Image

d
your dependencies, add your References

n od
parent
custom code.

ej
image

U
Image

s
bu
nt
u
Docker file for easy, Base image
reproducible builds. bootfs

kernel

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Four environments, same container

Local Laptop Staging / QA Production On-Prem

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Virtual machine versus Docker

VM App 2

App 1 App 2 App 3 Container

Bins/Libs Bins/Libs Bins/Libs App 1 App 2 App 3

Guest OS Guest OS Guest OS Bins/Libs Bins/Libs Bins/Libs

Hypervisor Docker

Host OS Host OS

Server (Host) Server (Host)

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Container & Docker Benefits

Portable application artifact that runs reliably everywhere

Run different applications or application versions with different


dependencies simultaneously

Better resource utilization by running multiple lightweight


containers per host

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential
Reference Architectures (Informational)
Amazon ECS:
Rebalancing Amazon ECS Tasks using AWS Lambda
NGINX Reverse Proxy on Amazon EC2 Container Service
Java Microservices Deployed on EC2 Container Service
Amazon ECS Reference Architecture: Batch Processing
Node.js Microservices Deployed on EC2 Container Service
Amazon EC2 Container Service - Reference Architecture: Service Discovery to containers using CloudWatch Events,
Lambda and Route 53 private hosted zones
Service Discovery for AWS EC2 Container Service via DNS
Canary Blue/Green deployments on ECS
Blue/Green deployments on ECS
ECS Reference Architecture: Continuous Deployment
Amazon ECS Scheduler Driver to integrate Apache Mesos with ECS

AWS Fargate
Blue/Green deployments using Fargate
How to host an ASP.NET core application in AWS Fargate using Linux containers

Amazon EKS
CodeSuite - Continuous Deployment Reference Architecture for Kubernetes

© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential

You might also like