SlideShare uma empresa Scribd logo
1 de 58
How to: run your containers on
AWS with ECS and Fargate
Abby Fuller
@abbyfuller
Quick show of hands: who here has worked with
containers before?
First things first…
What are containers and why are customers using them?
What are containers?
A container is an atomic, self-contained package of software that
includes everything it needs to run (code, runtime, libraries,
packages, etc.).
A popular, widely-used container platform is Docker. More on that
here: https://www.docker.com
Let’s talk container basics
Docker pull
Docker build
Docker run
Docker tag
Docker push
Why are containers so popular?
• Portable
• Lightweight
• Standardized
• Easy to deploy
• Along with containers, comes the “monolith to microservices” story:
containers and microservices go hand in hand (more on that in a second)
OK, so what are microservices?
”Service oriented architecture
composed of loosely coupled elements
that have bounded contexts.”
- Adrian Cockroft
Why do containers and microservices go
together?
• One job, one service à container
• Can deploy and scale containers independently
• This means that a high traffic service, like a messaging service, might need
to be scaled frequently, but a low traffic service, like an internal
dashboard, doesn’t need to be scaled at the same time
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Running one container is easy
Managing many containers is hard
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Server
Guest OS
Enter container orchestration tools
What are container orchestration tools?
Framework for managing, scaling, deploying containers.
Let’s recap the container options on AWS
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
What does the landscape look like all together?
Amazon ECS
(available now)
Amazon EKS
(preview)
Fargate mode for
ECS
(available now)
Fargate mode
for EKS
(available
2018)
ECS
Easiest way to deploy and manage
containers
Integration with entire AWS platform
ALB, Auto Scaling, Batch, Elastic Beanstalk,
CloudFormation, CloudTrail, CloudWatch Events,
CloudWatch Logs, CloudWatch Metrics, ECR, EC2 Spot,
IAM, NLB, Parameter Store, and VPC
Scales to support clusters of any size
Service integrations (like ALB and NLB) are at
container level
1
2
3
EKS
Managed Kubernetes on AWS
Highly available Automated
version upgrades
Integration with
other AWS
services
Etcd
Master
Managed
Kubernetes
control plane
CloudTrail, CloudWatch,
ELB, IAM, VPC, PrivateLink
Fargate
Launch quickly
Scale easily
No infrastructure
Resource based pricing
Containers on demand
Manage everything at
container level
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
“When someone asks you for a sandwich,
they aren’t asking you to put them in charge
of a global sandwich logistic chain. They just
want a sandwich”
P.S., the sandwich is Fargate
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
AMAZON CONTAINER SERVICES
So you want to run a (managed) container on AWS
Choose your orchestration tool1
Choose your launch type2
ECS EKS
EC2 Fargate EC2 Fargate
So how do you know which one is right for you?
Fargate vs EC2 mode
• Depends on your workload.
• For Fargate: if you have a Task Definition, and you’re ok with awsvpc
networking mode, try Fargate. Some caveats: can’t exec into the
container, or access the underlying host (this is also a good thing)
• For EC2 mode: good if you need to customize!
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
What are the differences between ec2 mode and
Fargate?
• Change in networking mode: "networkMode": "awsvpc”
• Only specify container port, no host port:
• "portMappings":
• [{"containerPort": ”8081"}]
• No links (only local loopback)
• No ELB Classic, only ALB or NLB. ALB needs to use target type IP, not
instance.
• Launch Type: Fargate
• Windows containers only on EC2, not Fargate
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
New and important!
• requiresCompatibilities parameter.
• "requiresCompatibilities": ["FARGATE"]
• You can have tasks that have multiple compatibilities:
• "requiresCompatibilities": ["FARGATE”, “EC2”]
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Hang on, what’s awsvpc?
• New task level networking type.
• Each Task is assigned an ENI (Elastic Network Interface), and a private IP (and
optionally a public IP, if you’re using Fargate) from your subnet.
• This allows for simplified container networking: containers that are part of the
same task (and thus on the same host) can use the local loopback interface.
Containers not on the same host use the ENI/hostname/IP
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Need some more info on working with awsvpc?
https://aws.amazon.com/blogs/compute/task-
networking-in-aws-fargate/
https://aws.amazon.com/blogs/compute/introdu
cing-cloud-native-networking-for-ecs-
containers/
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Need help migrating between Fargate and EC2?
https://aws.amazon.com/blogs/compute/migr
ating-your-amazon-ecs-containers-to-aws-
fargate/
ECS: can be totally managed, or can customize resource usage, networking, task placement
etc. to fit your application needs. Shared responsibility with AWS (because managed service).
ecs-agent is open source. Easy integration with other AWS services.
EKS: managed, upstream Kubernetes. Can connect to clusters through kubectl and use
existing tooling. Can opt in to managed version upgrades. Add resources to your cluster
through EC2 (now), or with Fargate mode (2018).
Fargate: underlying technology for containers on demand. Pass a Task Definition or
Kubernetes Pod, set resource limits, and Fargate manages everything else. NO access to
underlying host, no managing of resources. Great if you don’t want to handle scaling,
orchestration, deployments, upgrades yourself. Not for those of you that are making changes
to your infrastructure (i.e., bringing custom AMIs, or installing things through EC2 user-data)
tl;dr
https://medium.com/containers-on-
aws/choosing-your-container-environment-on-
aws-with-ecs-eks-and-fargate-cfbe416ab1a
Need more info on how to choose?
Let’s look at that in practice
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Running ECS containers (aka EC2 mode)
How does ECS map to traditional workloads?
Instances: standard EC2 boxes. Once registered to a Cluster, your
Tasks run here
Services: layer that manages and places tasks
Tasks: container wrapper and configuration around processes
running on the instance
What does that mean?
• In EC2 mode, you’re responsible for configuring all three of those pieces:
instances, services, and tasks.
• Instances are configured through the ecs-optimized AMI (or your own
AMI), and/or you can configure with EC2 user-data
• Services and Tasks (and containers) are all configured through the ECS
API, which you can either access directly, or go through the CLI. Tasks are
defined through Task Definitions, and Containers are defined through
Container Definitions.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
OK, so what’s a Task Definition?
{
"family": “scorekeep",
"containerDefinitions": [
{
"name":“scorekeep-frontend",
"image":"xxx.dkr.ecr.us-east-
1.amazonaws.com/fe"
},
{
"name":“scorekeep-api",
"image":"xxx.dkr.ecr.us-east-
1.amazonaws.com/api"
}
]
}
• Immutable, versioned document
• Identified by family:version
• Contains a list of up to 10 container definitions
• All containers are co-located on the same host
• Each container definition has:
• A name
• Image URL (ECR or Public Images)
• And more…stay tuned!
Task Definition Snippet
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Running Fargate containers
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Running Fargate containers in ECS
Use ECS APIs to launch Fargate Containers
Easy migration – Run Fargate and EC2 launch
type tasks in the same cluster
Same Task Definition schema
Primitives are shared with ECS
• Use the same primitives, and integrations as EC2 launch-type ECS tasks:
• VPC
• IAM
• CloudWatch
How do I know when to use Fargate vs EC2
mode?
• Depends on your workload.
• For Fargate: if you have a Task Definition, and you’re ok with awsvpc
networking mode, try Fargate. Some caveats: can’t exec into the
container, or access the underlying host (this is also a good thing)
• For EC2 mode: good if you need to customize!
Compute resources
Resource configuration with ECS
• Choose your own instance type, with any combination of resources
• Controlled through the Service ASG launch configuration, like with any
other EC2 cluster.
• Supports GPUs
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Resource configuration with Fargate
Flexible configuration options –
50 CPU/memory configurations
CPU Memory
256 (.25 vCPU) 512MB, 1GB, 2GB
512 (.5 vCPU) 1GB, 2GB, 3GB, 4GB
1024 (1 vCPU) 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB
2048 (2 vCPU) Between 4GB and 16GB in 1GB increments
4096 (4 vCPU) Between 8GB and 30GB in 1GB increments
Let’s talk about networking (baby)
Traditional Docker networking
Bridge: docker0. This is the default behavior. Containers on the same
network can communicate via IP address. No automatic service discovery.
Connect containers with ---link
None: no network interface, only local loopback (which I’ll explain shortly)
Host: connect to host network (container maps to host)
awsvpc (the longer version)
• With awsvpc, each task is allocated an ENI (Elastic Network Interface)
• Containers launched as part of the same task can use the local loopback
interface (remember that one?), since containers part of the same task
share an ENI
• With the ENI allocation comes a private IP. Public IPs can also be
allocated.
VPC integration in Fargate
• Launch your Fargate Tasks into subnets
• Beneath the hood :
• We create an Elastic Network Interface (ENI)
• The ENI is allocated a private IP from your subnet
• The ENI is attached to your task
• Your task now has a private IP from your subnet!
• You can also assign public IPs to your tasks
• Configure security groups to control inbound & outbound traffic
Looking for more networking details?
https://aws.amazon.com/blogs/compute/task-
networking-in-aws-fargate/
https://aws.amazon.com/blogs/compute/introducing-
cloud-native-networking-for-ecs-containers/
If you don’t know now you know
Hybrid clusters are possible
The same cluster can run tasks of type Fargate, and of type EC2
FAQ: how do I exec into a Fargate container?
Short Answer: you don’t
Longer answer: if it were me, I’d stop the Fargate container and restart as
type EC2 for debugging, then switch back over. Long term, something we’re
looking at building.
The Fargate wizard doesn’t let me use my own
VPC
The wizard is just for learning Fargate concepts and how it works. You
can absolutely use (and should use) your own VPC.
Wait what?
The wizard/getting started flow in Fargate will create a VPC and subnets for
you. You can both a) edit the resources created through the wizard, or
launch Fargate tasks into a previously created VPC through the regular
console flow/the CLI.
I get by with a little help from my
friends (CLIs).
CLIs (that I know of) for Fargate/ECS:
• aws-cli: the official OG. Open source, includes most AWS services.
• More info here: https://aws.amazon.com/cli/
• Github here: https://github.com/aws/aws-cli
• ecs-cli: also official, but just for ECS. Supports docker compose files.
• More info here: https://github.com/aws/amazon-ecs-cli
Some good unofficial options:
• Fargate cli: https://github.com/jpignata/fargate
• Coldbrew cli: https://github.com/coldbrewcloud/coldbrew-cli
What’s next?
We want to hear from all of you!
• More focus on supporting Tasks as compute primitive, more focus on
removing undifferentiated heavy lifting.
• Our roadmap is driven by feedback:
How can I get started?
• To join the EKS preview: https://aws.amazon.com/eks/
• To get started with Fargate: https://aws.amazon.com/fargate/
• Blogs: https://aws.amazon.com/blogs/aws/aws-fargate/
• https://aws.amazon.com/blogs/aws/amazon-elastic-container-service-for-kubernetes/
• Liz Rice from Aquasec on Fargate: https://blog.aquasec.com/securing-struts-in-aws-fargate
• Nathan Peck from AWS: https://medium.com/containers-on-aws/choosing-your-container-environment-on-
aws-with-ecs-eks-and-fargate-cfbe416ab1a
• Deepak Singh (containers GM at AWS): https://www.slideshare.net/AmazonWebServices/containers-on-aws-
state-of-the-union-con201-reinvent-2017
The awesome-ecs project:
https://github.com/nathanpeck/awesome-ecs
Workshops!
• From @brentcontained
• https://t.co/ba0usbZqHN
Need a little help?
Community Slack channels:
awsdevelopers.slack.com
amazon-ecs.slack.com
Or reach out to one of us directly:
@abbyfuller or abbyfull@amazon.com
@nathankpeck
@brentcontained
@paulmaddox
@ric_harvey
Go build (and tell us about it)!
Questions?
@abbyfuller

Mais conteúdo relacionado

Mais procurados

Introduction to AWS Cost Management
Introduction to AWS Cost ManagementIntroduction to AWS Cost Management
Introduction to AWS Cost ManagementAmazon Web Services
 
Elastic Load Balancing Deep Dive - AWS Online Tech Talk
Elastic  Load Balancing Deep Dive - AWS Online Tech TalkElastic  Load Balancing Deep Dive - AWS Online Tech Talk
Elastic Load Balancing Deep Dive - AWS Online Tech TalkAmazon Web Services
 
Webinar AWS 201 - Using Amazon Virtual Private Cloud (VPC)
Webinar AWS 201 - Using Amazon Virtual Private Cloud (VPC)Webinar AWS 201 - Using Amazon Virtual Private Cloud (VPC)
Webinar AWS 201 - Using Amazon Virtual Private Cloud (VPC)Amazon Web Services
 
Aws organizations
Aws organizationsAws organizations
Aws organizationsOlaf Conijn
 
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018Amazon Web Services
 
20200722 AWS Black Belt Online Seminar AWSアカウント シングルサインオンの設計と運用
20200722 AWS Black Belt Online Seminar AWSアカウント シングルサインオンの設計と運用20200722 AWS Black Belt Online Seminar AWSアカウント シングルサインオンの設計と運用
20200722 AWS Black Belt Online Seminar AWSアカウント シングルサインオンの設計と運用Amazon Web Services Japan
 
Introduction to AWS Secrets Manager
Introduction to AWS Secrets ManagerIntroduction to AWS Secrets Manager
Introduction to AWS Secrets ManagerAmazon Web Services
 
AWS CodeCommit, CodeDeploy & CodePipeline
AWS CodeCommit, CodeDeploy & CodePipelineAWS CodeCommit, CodeDeploy & CodePipeline
AWS CodeCommit, CodeDeploy & CodePipelineJulien SIMON
 
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_SingaporeCI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_SingaporeAmazon Web Services
 
Automating AWS security and compliance
Automating AWS security and compliance Automating AWS security and compliance
Automating AWS security and compliance John Varghese
 
K8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKSK8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKSAmazon Web Services
 
STG309_Deep Dive Using Hybrid Storage with AWS Storage Gateway to Solve On-Pr...
STG309_Deep Dive Using Hybrid Storage with AWS Storage Gateway to Solve On-Pr...STG309_Deep Dive Using Hybrid Storage with AWS Storage Gateway to Solve On-Pr...
STG309_Deep Dive Using Hybrid Storage with AWS Storage Gateway to Solve On-Pr...Amazon Web Services
 

Mais procurados (20)

Intro to AWS Lambda
Intro to AWS Lambda Intro to AWS Lambda
Intro to AWS Lambda
 
Deep dive into AWS IAM
Deep dive into AWS IAMDeep dive into AWS IAM
Deep dive into AWS IAM
 
Introduction to AWS Cost Management
Introduction to AWS Cost ManagementIntroduction to AWS Cost Management
Introduction to AWS Cost Management
 
AWS Secrets Manager
AWS Secrets ManagerAWS Secrets Manager
AWS Secrets Manager
 
Elastic Load Balancing Deep Dive - AWS Online Tech Talk
Elastic  Load Balancing Deep Dive - AWS Online Tech TalkElastic  Load Balancing Deep Dive - AWS Online Tech Talk
Elastic Load Balancing Deep Dive - AWS Online Tech Talk
 
Getting Started with Amazon EC2
Getting Started with Amazon EC2Getting Started with Amazon EC2
Getting Started with Amazon EC2
 
Webinar AWS 201 - Using Amazon Virtual Private Cloud (VPC)
Webinar AWS 201 - Using Amazon Virtual Private Cloud (VPC)Webinar AWS 201 - Using Amazon Virtual Private Cloud (VPC)
Webinar AWS 201 - Using Amazon Virtual Private Cloud (VPC)
 
Aws organizations
Aws organizationsAws organizations
Aws organizations
 
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
 
20200722 AWS Black Belt Online Seminar AWSアカウント シングルサインオンの設計と運用
20200722 AWS Black Belt Online Seminar AWSアカウント シングルサインオンの設計と運用20200722 AWS Black Belt Online Seminar AWSアカウント シングルサインオンの設計と運用
20200722 AWS Black Belt Online Seminar AWSアカウント シングルサインオンの設計と運用
 
Introduction to AWS Secrets Manager
Introduction to AWS Secrets ManagerIntroduction to AWS Secrets Manager
Introduction to AWS Secrets Manager
 
AWS CodeCommit, CodeDeploy & CodePipeline
AWS CodeCommit, CodeDeploy & CodePipelineAWS CodeCommit, CodeDeploy & CodePipeline
AWS CodeCommit, CodeDeploy & CodePipeline
 
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_SingaporeCI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
 
CI/CD on AWS
CI/CD on AWSCI/CD on AWS
CI/CD on AWS
 
AWS 101
AWS 101AWS 101
AWS 101
 
AWS EC2
AWS EC2AWS EC2
AWS EC2
 
Deep dive - AWS Fargate
Deep dive - AWS FargateDeep dive - AWS Fargate
Deep dive - AWS Fargate
 
Automating AWS security and compliance
Automating AWS security and compliance Automating AWS security and compliance
Automating AWS security and compliance
 
K8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKSK8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKS
 
STG309_Deep Dive Using Hybrid Storage with AWS Storage Gateway to Solve On-Pr...
STG309_Deep Dive Using Hybrid Storage with AWS Storage Gateway to Solve On-Pr...STG309_Deep Dive Using Hybrid Storage with AWS Storage Gateway to Solve On-Pr...
STG309_Deep Dive Using Hybrid Storage with AWS Storage Gateway to Solve On-Pr...
 

Semelhante a How To Run Your Containers on AWS with ECS & Fargate: Collision 2018

Introduction to Containers - AWS Startup Day Johannesburg.pdf
Introduction to Containers - AWS Startup Day Johannesburg.pdfIntroduction to Containers - AWS Startup Day Johannesburg.pdf
Introduction to Containers - AWS Startup Day Johannesburg.pdfAmazon Web Services
 
Getting Started with Containers on AWS: Collision 2018
Getting Started with Containers on AWS: Collision 2018Getting Started with Containers on AWS: Collision 2018
Getting Started with Containers on AWS: Collision 2018Amazon Web Services
 
State of the Union: Containers on AWS
State of the Union: Containers on AWSState of the Union: Containers on AWS
State of the Union: Containers on AWSAmazon Web Services
 
Running containers in AWS
Running containers in AWSRunning containers in AWS
Running containers in AWSAndrewMay59
 
Serverless and mixed container orchestration and request routing on AWS
Serverless and mixed container orchestration and request routing on AWSServerless and mixed container orchestration and request routing on AWS
Serverless and mixed container orchestration and request routing on AWSGlobalLogic Ukraine
 
Amazon ECS with Docker | AWS Public Sector Summit 2016
Amazon ECS with Docker | AWS Public Sector Summit 2016Amazon ECS with Docker | AWS Public Sector Summit 2016
Amazon ECS with Docker | AWS Public Sector Summit 2016Amazon Web Services
 
Getting Started with Amazon EKS (Managed Kubernetes)
Getting Started with Amazon EKS (Managed Kubernetes)Getting Started with Amazon EKS (Managed Kubernetes)
Getting Started with Amazon EKS (Managed Kubernetes)Tanya Seno
 
Docker clusters on AWS with Amazon ECS and Kubernetes
Docker clusters on AWS with Amazon ECS and KubernetesDocker clusters on AWS with Amazon ECS and Kubernetes
Docker clusters on AWS with Amazon ECS and KubernetesJulien SIMON
 
Running containerized application in AWS ECS
Running containerized application in AWS ECSRunning containerized application in AWS ECS
Running containerized application in AWS ECSDevOps Indonesia
 
Containers Meetup (AWS+CNCF) Milano Jan 15th 2020
Containers Meetup (AWS+CNCF) Milano Jan 15th 2020Containers Meetup (AWS+CNCF) Milano Jan 15th 2020
Containers Meetup (AWS+CNCF) Milano Jan 15th 2020Massimo Ferre'
 
AWS re:Invent re:Cap - 배포를 더욱 손쉽고 빠르게: Amazon EC2 Container Service - 김일호
AWS re:Invent re:Cap - 배포를 더욱 손쉽고 빠르게: Amazon EC2 Container Service - 김일호AWS re:Invent re:Cap - 배포를 더욱 손쉽고 빠르게: Amazon EC2 Container Service - 김일호
AWS re:Invent re:Cap - 배포를 더욱 손쉽고 빠르게: Amazon EC2 Container Service - 김일호Amazon Web Services Korea
 
From Docker Straight to AWS
From Docker Straight to AWSFrom Docker Straight to AWS
From Docker Straight to AWSDevOps.com
 
Deep dive ECS & Fargate Deep Dive
Deep dive ECS & Fargate Deep DiveDeep dive ECS & Fargate Deep Dive
Deep dive ECS & Fargate Deep DiveAmazon Web Services
 
IDI 2020 - Containers Meet Serverless
IDI 2020 - Containers Meet ServerlessIDI 2020 - Containers Meet Serverless
IDI 2020 - Containers Meet ServerlessMassimo Ferre'
 
ECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container Day
ECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container DayECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container Day
ECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container DayAmazon Web Services Korea
 

Semelhante a How To Run Your Containers on AWS with ECS & Fargate: Collision 2018 (20)

Introduction to Containers - AWS Startup Day Johannesburg.pdf
Introduction to Containers - AWS Startup Day Johannesburg.pdfIntroduction to Containers - AWS Startup Day Johannesburg.pdf
Introduction to Containers - AWS Startup Day Johannesburg.pdf
 
Getting Started with Containers on AWS: Collision 2018
Getting Started with Containers on AWS: Collision 2018Getting Started with Containers on AWS: Collision 2018
Getting Started with Containers on AWS: Collision 2018
 
Containers State of the Union
Containers State of the UnionContainers State of the Union
Containers State of the Union
 
Deep Dive into AWS Fargate
Deep Dive into AWS FargateDeep Dive into AWS Fargate
Deep Dive into AWS Fargate
 
State of the Union: Containers on AWS
State of the Union: Containers on AWSState of the Union: Containers on AWS
State of the Union: Containers on AWS
 
Running containers in AWS
Running containers in AWSRunning containers in AWS
Running containers in AWS
 
Serverless and mixed container orchestration and request routing on AWS
Serverless and mixed container orchestration and request routing on AWSServerless and mixed container orchestration and request routing on AWS
Serverless and mixed container orchestration and request routing on AWS
 
Amazon ECS with Docker | AWS Public Sector Summit 2016
Amazon ECS with Docker | AWS Public Sector Summit 2016Amazon ECS with Docker | AWS Public Sector Summit 2016
Amazon ECS with Docker | AWS Public Sector Summit 2016
 
Shipping logs to splunk from a container in aws howto
Shipping logs to splunk from a container in aws howtoShipping logs to splunk from a container in aws howto
Shipping logs to splunk from a container in aws howto
 
Advanced Container Scheduling
Advanced Container SchedulingAdvanced Container Scheduling
Advanced Container Scheduling
 
Getting Started with Amazon EKS (Managed Kubernetes)
Getting Started with Amazon EKS (Managed Kubernetes)Getting Started with Amazon EKS (Managed Kubernetes)
Getting Started with Amazon EKS (Managed Kubernetes)
 
應用開發新思維
應用開發新思維應用開發新思維
應用開發新思維
 
Docker clusters on AWS with Amazon ECS and Kubernetes
Docker clusters on AWS with Amazon ECS and KubernetesDocker clusters on AWS with Amazon ECS and Kubernetes
Docker clusters on AWS with Amazon ECS and Kubernetes
 
Running containerized application in AWS ECS
Running containerized application in AWS ECSRunning containerized application in AWS ECS
Running containerized application in AWS ECS
 
Containers Meetup (AWS+CNCF) Milano Jan 15th 2020
Containers Meetup (AWS+CNCF) Milano Jan 15th 2020Containers Meetup (AWS+CNCF) Milano Jan 15th 2020
Containers Meetup (AWS+CNCF) Milano Jan 15th 2020
 
AWS re:Invent re:Cap - 배포를 더욱 손쉽고 빠르게: Amazon EC2 Container Service - 김일호
AWS re:Invent re:Cap - 배포를 더욱 손쉽고 빠르게: Amazon EC2 Container Service - 김일호AWS re:Invent re:Cap - 배포를 더욱 손쉽고 빠르게: Amazon EC2 Container Service - 김일호
AWS re:Invent re:Cap - 배포를 더욱 손쉽고 빠르게: Amazon EC2 Container Service - 김일호
 
From Docker Straight to AWS
From Docker Straight to AWSFrom Docker Straight to AWS
From Docker Straight to AWS
 
Deep dive ECS & Fargate Deep Dive
Deep dive ECS & Fargate Deep DiveDeep dive ECS & Fargate Deep Dive
Deep dive ECS & Fargate Deep Dive
 
IDI 2020 - Containers Meet Serverless
IDI 2020 - Containers Meet ServerlessIDI 2020 - Containers Meet Serverless
IDI 2020 - Containers Meet Serverless
 
ECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container Day
ECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container DayECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container Day
ECS & ECR Deep Dive - 김기완 솔루션즈 아키텍트 :: AWS Container Day
 

Mais de Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsAmazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareAmazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSAmazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAmazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareAmazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 

Mais de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

How To Run Your Containers on AWS with ECS & Fargate: Collision 2018

  • 1. How to: run your containers on AWS with ECS and Fargate Abby Fuller @abbyfuller
  • 2. Quick show of hands: who here has worked with containers before?
  • 3. First things first… What are containers and why are customers using them?
  • 4. What are containers? A container is an atomic, self-contained package of software that includes everything it needs to run (code, runtime, libraries, packages, etc.). A popular, widely-used container platform is Docker. More on that here: https://www.docker.com
  • 5. Let’s talk container basics Docker pull Docker build Docker run Docker tag Docker push
  • 6. Why are containers so popular? • Portable • Lightweight • Standardized • Easy to deploy • Along with containers, comes the “monolith to microservices” story: containers and microservices go hand in hand (more on that in a second)
  • 7. OK, so what are microservices? ”Service oriented architecture composed of loosely coupled elements that have bounded contexts.” - Adrian Cockroft
  • 8. Why do containers and microservices go together? • One job, one service à container • Can deploy and scale containers independently • This means that a high traffic service, like a messaging service, might need to be scaled frequently, but a low traffic service, like an internal dashboard, doesn’t need to be scaled at the same time
  • 9. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Running one container is easy
  • 10. Managing many containers is hard Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS
  • 12. What are container orchestration tools? Framework for managing, scaling, deploying containers.
  • 13. Let’s recap the container options on AWS
  • 14. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. What does the landscape look like all together? Amazon ECS (available now) Amazon EKS (preview) Fargate mode for ECS (available now) Fargate mode for EKS (available 2018)
  • 15. ECS Easiest way to deploy and manage containers Integration with entire AWS platform ALB, Auto Scaling, Batch, Elastic Beanstalk, CloudFormation, CloudTrail, CloudWatch Events, CloudWatch Logs, CloudWatch Metrics, ECR, EC2 Spot, IAM, NLB, Parameter Store, and VPC Scales to support clusters of any size Service integrations (like ALB and NLB) are at container level 1 2 3
  • 16. EKS Managed Kubernetes on AWS Highly available Automated version upgrades Integration with other AWS services Etcd Master Managed Kubernetes control plane CloudTrail, CloudWatch, ELB, IAM, VPC, PrivateLink
  • 17. Fargate Launch quickly Scale easily No infrastructure Resource based pricing Containers on demand Manage everything at container level
  • 18. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. “When someone asks you for a sandwich, they aren’t asking you to put them in charge of a global sandwich logistic chain. They just want a sandwich” P.S., the sandwich is Fargate
  • 19. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. AMAZON CONTAINER SERVICES So you want to run a (managed) container on AWS Choose your orchestration tool1 Choose your launch type2 ECS EKS EC2 Fargate EC2 Fargate
  • 20. So how do you know which one is right for you?
  • 21. Fargate vs EC2 mode • Depends on your workload. • For Fargate: if you have a Task Definition, and you’re ok with awsvpc networking mode, try Fargate. Some caveats: can’t exec into the container, or access the underlying host (this is also a good thing) • For EC2 mode: good if you need to customize!
  • 22. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. What are the differences between ec2 mode and Fargate? • Change in networking mode: "networkMode": "awsvpc” • Only specify container port, no host port: • "portMappings": • [{"containerPort": ”8081"}] • No links (only local loopback) • No ELB Classic, only ALB or NLB. ALB needs to use target type IP, not instance. • Launch Type: Fargate • Windows containers only on EC2, not Fargate
  • 23. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. New and important! • requiresCompatibilities parameter. • "requiresCompatibilities": ["FARGATE"] • You can have tasks that have multiple compatibilities: • "requiresCompatibilities": ["FARGATE”, “EC2”]
  • 24. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Hang on, what’s awsvpc? • New task level networking type. • Each Task is assigned an ENI (Elastic Network Interface), and a private IP (and optionally a public IP, if you’re using Fargate) from your subnet. • This allows for simplified container networking: containers that are part of the same task (and thus on the same host) can use the local loopback interface. Containers not on the same host use the ENI/hostname/IP
  • 25. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Need some more info on working with awsvpc? https://aws.amazon.com/blogs/compute/task- networking-in-aws-fargate/ https://aws.amazon.com/blogs/compute/introdu cing-cloud-native-networking-for-ecs- containers/
  • 26. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Need help migrating between Fargate and EC2? https://aws.amazon.com/blogs/compute/migr ating-your-amazon-ecs-containers-to-aws- fargate/
  • 27. ECS: can be totally managed, or can customize resource usage, networking, task placement etc. to fit your application needs. Shared responsibility with AWS (because managed service). ecs-agent is open source. Easy integration with other AWS services. EKS: managed, upstream Kubernetes. Can connect to clusters through kubectl and use existing tooling. Can opt in to managed version upgrades. Add resources to your cluster through EC2 (now), or with Fargate mode (2018). Fargate: underlying technology for containers on demand. Pass a Task Definition or Kubernetes Pod, set resource limits, and Fargate manages everything else. NO access to underlying host, no managing of resources. Great if you don’t want to handle scaling, orchestration, deployments, upgrades yourself. Not for those of you that are making changes to your infrastructure (i.e., bringing custom AMIs, or installing things through EC2 user-data) tl;dr
  • 29. Let’s look at that in practice
  • 30. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Running ECS containers (aka EC2 mode)
  • 31. How does ECS map to traditional workloads? Instances: standard EC2 boxes. Once registered to a Cluster, your Tasks run here Services: layer that manages and places tasks Tasks: container wrapper and configuration around processes running on the instance
  • 32. What does that mean? • In EC2 mode, you’re responsible for configuring all three of those pieces: instances, services, and tasks. • Instances are configured through the ecs-optimized AMI (or your own AMI), and/or you can configure with EC2 user-data • Services and Tasks (and containers) are all configured through the ECS API, which you can either access directly, or go through the CLI. Tasks are defined through Task Definitions, and Containers are defined through Container Definitions.
  • 33. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. OK, so what’s a Task Definition? { "family": “scorekeep", "containerDefinitions": [ { "name":“scorekeep-frontend", "image":"xxx.dkr.ecr.us-east- 1.amazonaws.com/fe" }, { "name":“scorekeep-api", "image":"xxx.dkr.ecr.us-east- 1.amazonaws.com/api" } ] } • Immutable, versioned document • Identified by family:version • Contains a list of up to 10 container definitions • All containers are co-located on the same host • Each container definition has: • A name • Image URL (ECR or Public Images) • And more…stay tuned! Task Definition Snippet
  • 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Running Fargate containers
  • 35. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Running Fargate containers in ECS Use ECS APIs to launch Fargate Containers Easy migration – Run Fargate and EC2 launch type tasks in the same cluster Same Task Definition schema
  • 36. Primitives are shared with ECS • Use the same primitives, and integrations as EC2 launch-type ECS tasks: • VPC • IAM • CloudWatch
  • 37. How do I know when to use Fargate vs EC2 mode? • Depends on your workload. • For Fargate: if you have a Task Definition, and you’re ok with awsvpc networking mode, try Fargate. Some caveats: can’t exec into the container, or access the underlying host (this is also a good thing) • For EC2 mode: good if you need to customize!
  • 39. Resource configuration with ECS • Choose your own instance type, with any combination of resources • Controlled through the Service ASG launch configuration, like with any other EC2 cluster. • Supports GPUs
  • 40. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Resource configuration with Fargate Flexible configuration options – 50 CPU/memory configurations CPU Memory 256 (.25 vCPU) 512MB, 1GB, 2GB 512 (.5 vCPU) 1GB, 2GB, 3GB, 4GB 1024 (1 vCPU) 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB 2048 (2 vCPU) Between 4GB and 16GB in 1GB increments 4096 (4 vCPU) Between 8GB and 30GB in 1GB increments
  • 41. Let’s talk about networking (baby)
  • 42. Traditional Docker networking Bridge: docker0. This is the default behavior. Containers on the same network can communicate via IP address. No automatic service discovery. Connect containers with ---link None: no network interface, only local loopback (which I’ll explain shortly) Host: connect to host network (container maps to host)
  • 43. awsvpc (the longer version) • With awsvpc, each task is allocated an ENI (Elastic Network Interface) • Containers launched as part of the same task can use the local loopback interface (remember that one?), since containers part of the same task share an ENI • With the ENI allocation comes a private IP. Public IPs can also be allocated.
  • 44. VPC integration in Fargate • Launch your Fargate Tasks into subnets • Beneath the hood : • We create an Elastic Network Interface (ENI) • The ENI is allocated a private IP from your subnet • The ENI is attached to your task • Your task now has a private IP from your subnet! • You can also assign public IPs to your tasks • Configure security groups to control inbound & outbound traffic
  • 45. Looking for more networking details? https://aws.amazon.com/blogs/compute/task- networking-in-aws-fargate/ https://aws.amazon.com/blogs/compute/introducing- cloud-native-networking-for-ecs-containers/
  • 46. If you don’t know now you know
  • 47. Hybrid clusters are possible The same cluster can run tasks of type Fargate, and of type EC2 FAQ: how do I exec into a Fargate container? Short Answer: you don’t Longer answer: if it were me, I’d stop the Fargate container and restart as type EC2 for debugging, then switch back over. Long term, something we’re looking at building.
  • 48. The Fargate wizard doesn’t let me use my own VPC The wizard is just for learning Fargate concepts and how it works. You can absolutely use (and should use) your own VPC. Wait what? The wizard/getting started flow in Fargate will create a VPC and subnets for you. You can both a) edit the resources created through the wizard, or launch Fargate tasks into a previously created VPC through the regular console flow/the CLI.
  • 49. I get by with a little help from my friends (CLIs).
  • 50. CLIs (that I know of) for Fargate/ECS: • aws-cli: the official OG. Open source, includes most AWS services. • More info here: https://aws.amazon.com/cli/ • Github here: https://github.com/aws/aws-cli • ecs-cli: also official, but just for ECS. Supports docker compose files. • More info here: https://github.com/aws/amazon-ecs-cli Some good unofficial options: • Fargate cli: https://github.com/jpignata/fargate • Coldbrew cli: https://github.com/coldbrewcloud/coldbrew-cli
  • 52. We want to hear from all of you! • More focus on supporting Tasks as compute primitive, more focus on removing undifferentiated heavy lifting. • Our roadmap is driven by feedback:
  • 53. How can I get started? • To join the EKS preview: https://aws.amazon.com/eks/ • To get started with Fargate: https://aws.amazon.com/fargate/ • Blogs: https://aws.amazon.com/blogs/aws/aws-fargate/ • https://aws.amazon.com/blogs/aws/amazon-elastic-container-service-for-kubernetes/ • Liz Rice from Aquasec on Fargate: https://blog.aquasec.com/securing-struts-in-aws-fargate • Nathan Peck from AWS: https://medium.com/containers-on-aws/choosing-your-container-environment-on- aws-with-ecs-eks-and-fargate-cfbe416ab1a • Deepak Singh (containers GM at AWS): https://www.slideshare.net/AmazonWebServices/containers-on-aws- state-of-the-union-con201-reinvent-2017
  • 55. Workshops! • From @brentcontained • https://t.co/ba0usbZqHN
  • 56. Need a little help? Community Slack channels: awsdevelopers.slack.com amazon-ecs.slack.com Or reach out to one of us directly: @abbyfuller or abbyfull@amazon.com @nathankpeck @brentcontained @paulmaddox @ric_harvey
  • 57. Go build (and tell us about it)!