SlideShare una empresa de Scribd logo
1 de 72
Descargar para leer sin conexión
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Visibility into Serverless Applications
built using AWS Fargate
Uttara Sridhar
Senior Software Engineer
Amazon
C O N 3 1 2 - R
Karly Sindy
R&D Software Engineer
Catalytic Data Science
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Agenda
Sample application on AWS Fargate
Visibility Aspects
Logging
Monitoring
Debugging
Catalytic’s parallelized bioinformatics workflows with Fargate
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Scorekeep Application
Creates and manages
game sessions and users
Backend
Business logic
Stores state in DynamoDB
Frontend
Page elements built using Angular
nginx to serve pages and
route /api requests to backend
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Serverless Containers
Why Containers?
Portable
Flexible
Fast
Efficient
Why Serverless?
No instance management
Faster time-to-market
Scalable
Pay for use
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Fargate
Simple, easy to use,
powerful consumption model
Resource
based pricing
No instances
to manage
Container
native APIFargate
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Availability Zone #1 Availability Zone #2 Availability Zone #3
Scheduling and Orchestration
Cluster Manager Placement Engine
Amazon ECS supports AWS Fargate
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon ECS supports AWS Fargate
EC2 Instance
ECS
AMI
Docker
agent
ECS
agent
EC2 Instance
ECS
AMI
Docker
agent
ECS
agent
EC2 Instance
ECS
AMI
Docker
agent
ECS
agent
Scheduling and Orchestration
Cluster Manager Placement Engine
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Benefits
MANAGED by AWS
No Amazon EC2 Instances to provision, scale or
manage.
ELASTIC
Scale up & down seamlessly. Pay only for what
you use.
INTEGRATED
with the AWS ecosystem: VPC Networking,
Amazon Elastic Load Balancing, AWS IAM
Permissions, Amazon CloudWatch and more.
Your Docker
Containers
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Scorekeep Application Architecture
https://github.com/aws-samples/eb-java-scorekeep/tree/fargate
Frontend Server
Container
Angular + Nginx
API Server
Container
Java
Port
8080
Port
5000
Internet
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Application Building Blocks
Compute Networking
* CPU units
* Memory
* Storage
Security
* Amazon VPC
* Subnets
* Internet, NAT Gateways
* Route tables
* Elastic Network Interface
* AWS IAM Permissions
* Security groups
* How to know the health of
my application?
* How to measure latencies,
error rate, call volume?
* How to automatically alert
application owners?
* How to troubleshoot?
Visibility
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Scorekeep Application with AWS Fargate
Amazon ECS Task Definition:
{
"family": "scorekeep",
"cpu": "1 vCpu",
"memory": "2 gb",
"networkMode":"awsvpc",
"taskRoleArn": "arn:aws:…",
"executionRoleArn”: “arn:…”
"requiresCompatibilities":
[
"FARGATE"
],
"containerDefinitions": [
{
"name": "scorekeep-frontend",
"image":“xxx.dkr.ecr…frontend",
"cpu": 256,
"memoryReservation": 512,
"portMappings" : [
{ "containerPort": 8080 }
],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "scorekeep",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix":
"scorekeep/frontend”
}
}
}
]}
{
"name": "scorekeep-api",
"image":“xxx.dkr.ecr…api",
"cpu": 768,
"memoryReservation": 512,
"portMappings" : [
{ "containerPort": 5000 }
],
"environment": […], #env var
"logConfiguration": {
"logDriver": "awslogs",
"options": {
“awslogs-group": "scorekeep",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix":
"scorekeep/api”
}
}
},
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Scorekeep Application with AWS Fargate
Amazon ECS Task Definition: Compute
{
"family": "scorekeep",
"cpu": "1 vCpu",
"memory": "2 gb",
"networkMode":"awsvpc",
"taskRoleArn": "arn:aws:…",
"executionRoleArn”: “arn:…”
"requiresCompatibilities":
[
"FARGATE"
],
"containerDefinitions": [
{
"name": "scorekeep-frontend",
"image":“xxx.dkr.ecr…frontend",
"cpu": 256,
"memoryReservation": 512,
"portMappings" : [
{ "containerPort": 8080 }
],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "scorekeep",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix":
"scorekeep/frontend”
}
}
}
]}
{
"name": "scorekeep-api",
"image":“xxx.dkr.ecr…api",
"cpu": 768,
"memoryReservation": 512,
"portMappings" : [
{ "containerPort": 5000 }
],
"environment": […], #env var
"logConfiguration": {
"logDriver": "awslogs",
"options": {
“awslogs-group": "scorekeep",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix":
"scorekeep/api”
}
}
},
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Scorekeep Application with AWS Fargate
Amazon ECS Task Definition: Networking
{
"family": "scorekeep",
"cpu": "1 vCpu",
"memory": "2 gb",
"networkMode":"awsvpc",
"taskRoleArn": "arn:aws:…",
"executionRoleArn”: “arn:…”
"requiresCompatibilities":
[
"FARGATE"
],
"containerDefinitions": [
{
"name": "scorekeep-frontend",
"image":“xxx.dkr.ecr…frontend",
"cpu": 256,
"memoryReservation": 512,
"portMappings" : [
{ "containerPort": 8080 }
],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "scorekeep",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix":
"scorekeep/frontend”
}
}
}
]}
{
"name": "scorekeep-api",
"image":“xxx.dkr.ecr…api",
"cpu": 768,
"memoryReservation": 512,
"portMappings" : [
{ "containerPort": 5000 }
],
"environment": […], #env var
"logConfiguration": {
"logDriver": "awslogs",
"options": {
“awslogs-group": "scorekeep",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix":
"scorekeep/api”
}
}
},
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Scorekeep Application with AWS Fargate
Amazon ECS Task Definition: Security
{
"family": "scorekeep",
"cpu": "1 vCpu",
"memory": "2 gb",
"networkMode":"awsvpc",
"taskRoleArn": "arn:aws:…",
"executionRoleArn”: “arn:…”
"requiresCompatibilities":
[
"FARGATE"
],
"containerDefinitions": [
{
"name": "scorekeep-frontend",
"image":“xxx.dkr.ecr…frontend",
"cpu": 256,
"memoryReservation": 512,
"portMappings" : [
{ "containerPort": 8080 }
],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "scorekeep",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix":
"scorekeep/frontend”
}
}
}
]}
{
"name": "scorekeep-api",
"image":“xxx.dkr.ecr…api",
"cpu": 768,
"memoryReservation": 512,
"portMappings" : [
{ "containerPort": 5000 }
],
"environment": […], #env var
"logConfiguration": {
"logDriver": "awslogs",
"options": {
“awslogs-group": "scorekeep",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix":
"scorekeep/api”
}
}
},
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Scorekeep Application with AWS Fargate
Amazon ECS Task Definition: Visibility
{
"family": "scorekeep",
"cpu": "1 vCpu",
"memory": "2 gb",
"networkMode":"awsvpc",
"taskRoleArn": "arn:aws:…",
"executionRoleArn”: “arn:…”
"requiresCompatibilities":
[
"FARGATE"
],
"containerDefinitions": [
{
"name": "scorekeep-frontend",
"image":“xxx.dkr.ecr…frontend",
"cpu": 256,
"memoryReservation": 512,
"portMappings" : [
{ "containerPort": 8080 }
],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "scorekeep",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix":
"scorekeep/frontend”
}
}
}
]}
{
"name": "scorekeep-api",
"image":“xxx.dkr.ecr…api",
"cpu": 768,
"memoryReservation": 512,
"portMappings" : [
{ "containerPort": 5000 }
],
"environment": […], #env var
"logConfiguration": {
"logDriver": "awslogs",
"options": {
“awslogs-group": "scorekeep",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix":
"scorekeep/api”
}
}
},
Scorekeep Application with AWS Fargate
# Register Task Definition
$ aws ecs register-task-definition --cli-input-json file:///scorekeep-task-
definition.json
# Create Cluster
$ aws ecs create-cluster --cluster-name FargateDemoCluster
# Create Service
$ aws ecs create-service --service-name ScorekeepService
--cluster FargateDemoCluster --task-definition scorekeep:1
--launch-type FARGATE –desired-count 5
--network-configuration
# Networking
"awsvpcConfiguration={subnets=[subnet-xxx], securityGroups=[sg-xxx]}“
--load-balancer “[{"targetGroupArn":“arn:aws:xxx",
"containerName":“scorekeep-frontend",
"containerPort":8080}]”
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Scorekeep Application
Frontend Server
Container
Angular + Nginx
API Server
Container
Java
Port
8080
Port
5000
Internet
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Visibility Aspects
Logging Monitoring Debugging
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Visibility Aspects
Monitoring DebuggingLogging
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Logging
Critical component to our diagnostics and monitoring
Enforce best practices to logging
Provide as much relevant information
Avoid spamming
Use appropriate log levels: fatal, error, warning
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Logging
Send application logs to a logging framework
AWS Fargate supports Amazon CloudWatch log driver
Track user activity and API usage
AWS CloudTrail
Tracing application requests
AWS X-Ray
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Logging with Amazon CloudWatch
Use the awslogs driver
to send stdout from
your application to
Cloudwatch logs
Create a log group in
Cloudwatch
Configure the log
driver in your task
definition
Remember to add
permissions via the
Task Execution Role
Logging with AWS CloudTrail
{
"EventId": "89baa6bb-9380-4983-9670-5688359abbb9",
"EventName": "DescribeServices",
"EventTime": 1542301015.0,
"EventSource": "ecs.amazonaws.com",
"Username": "root",
"Resources": [],
"CloudTrailEvent":
"{"eventVersion":"1.04","userIdentity":{"type":"Root","principalId":”xxxx",
"arn":"arn:aws:iam::xxxx:root","accountId":”xxxx","accessKeyId":”xxxx","sess
ionContext":{"attributes":{"mfaAuthenticated":"false","creationDate":"2018-11-
15T07:26:14Z"}}},"eventTime":"2018-11-
15T16:56:55Z","eventSource":"ecs.amazonaws.com","eventName":"DescribeServices",
"awsRegion":"eu-west-
1","sourceIPAddress":"172.92.129.249","userAgent":"console.amazonaws.com","requ
estParameters":{"services":["scorekeep-service"],"cluster":"scorekeep-
cluster"},"responseElements":null,"requestID":"5b38e298-2b16-427c-9b05-
e60272ffa1a0","eventID":"89baa6bb-9380-4983-9670-
5688359abbb9","eventType":"AwsApiCall","recipientAccountId":”xxxx"}"
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Tracing with AWS X-Ray
Create a Docker image
that runs the daemon.
Add managed policies
to your task role to
grant the daemon
permission to upload
trace data to X-Ray.
Run it as a side-car
container. Update
Amazon ECS Task
definition.
Invoke Update Service.
{
"name": "xray-daemon",
"image": ”xxxx.dkr.ecr.xxx.amazonaws.com/xray-daemon",
"cpu": 32,
"memoryReservation": 256,
"portMappings" : [
{
"containerPort": 2000,
"protocol": "udp"
}]
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Visibility Aspects
DebuggingMonitoringLogging
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Monitoring
Metrics
Measure availability, reliability
and performance
Instrument/profile your code
Helpful for troubleshooting
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Monitoring: Metrics
Key Metrics
Application metrics: Server-side/client-side latency, error rates, timeouts, CPU/memory,
heartbeats
Load balancers metrics: request count, connection count, 5xxs, 4xxs
Dependency metrics: latency, error rates, timeouts, DB throughput
Amazon CloudWatch
Default Amazon ECS Metrics
Metric data sent to CloudWatch in 1-minute periods and recorded for a period of two weeks
Available metrics: CPUUtilization, MemoryUtilization
Available dimensions: ClusterName,ServiceName
Emit custom metrics, use Amazon CloudWatch metric filters
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Monitoring: Metrics with Amazon CloudWatch
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Monitoring
Metrics
Measure availability, reliability
and performance
Instrument/profile your code
Helpful for troubleshooting
Dashboards
Monitor your resources in a
single view
Operational meetings
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Monitoring: Dashboarding with Amazon CloudWatch
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Monitoring: with Datadog Autodiscovery and AWS Fargate
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Monitoring
Metrics
Measure availability, reliability
and performance
Instrument/profile your code
Helpful for troubleshooting
Dashboards
Monitor your resources in a
single view
Operational meetings
Alarms
Automated alerts to notify
threshold breaches
Paging on-call, email
notifications, or take autoscaling
actions
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Monitoring
Metrics
Measure availability, reliability
and performance
Instrument/profile your code
Helpful for troubleshooting
Dashboards
Monitor your resources in a
single view
Operational meetings
Alarms
Automated alerts to notify
threshold breaches
Paging on-call, email
notifications, or take autoscaling
actions
State Change Events
Trace using Amazon CloudWatch
Events
Monitoring: with Amazon CloudWatch Events
{
"version": "0",
"id": "d5e4d7c2-8b04-d387-ded5-779de044ce5b",
"detail-type": "ECS Task State Change",
"source": "aws.ecs",
…
"resources": [
"arn:aws:ecs:eu-west-1:xxx:task/8b813908-0e5f-4bc0-a901-65144ce6d9ef"
],
"detail": {
"stoppedReason": "Scaling activity initiated by (deployment ecs-
svc/9223370498172059827)",
"launchType": "FARGATE",
"cpu": "1024",
"memory": "2048",
"desiredStatus": "STOPPED",
"group": "service:scorekeep-service",
"lastStatus": "STOPPED",
"containers": […]
…
}
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Monitoring
Metrics
Measure availability, reliability
and performance
Instrument/profile your code
Helpful for troubleshooting
Dashboards
Monitor your resources in a
single view
Operational meetings
Alarms
Automated alerts to notify
threshold breaches
Paging on-call, email
notifications, or take autoscaling
actions
State Change Events
Trace using Amazon CloudWatch
Events
Health Checks
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Monitoring: with Container Health Checks
- Define custom health check commands in the Amazon ECS Task
Definition
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Visibility Aspects
Logging Monitoring Debugging
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Debugging
Amazon ECS APIs and Console
• Task and container stopped reason
• Task StateChange events using Amazon CloudWatch
• Service events in describe-service payload
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Debugging Task Limit Exceeded
Request limit increase
https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Debugging Container Pull Error
Amazon ECS Troubleshooting Guide
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_cannot_pull_image.html
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Debugging
Amazon ECS APIs and Console
• Task and container stopped reason
• Task StateChange events using Amazon CloudWatch
• Service events in describe-service payload
Application Logs using Amazon CloudWatch
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Debugging
Amazon ECS APIs and Console
• Task and container stopped reason
• Task StateChange events using Amazon CloudWatch
• Service events in describe-service payload
Application Logs using Amazon CloudWatch
Task Metadata API
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Debugging with Task Metadata
Query environmental data and statistics for running tasks from within the Task!
Enables monitoring tools like Datadog, etc
Endpoints available:
Task Level (for all containers)
169.254.170.2/v2/metadata – Metadata JSON for Task
169.254.170.2/v2/stats - Docker stats JSON for all containers in the Task
Container Level
169.254.170.2/v2/metadata/<container-id>
169.254.170.2/v2/stats/<container-id>
Debugging with Task Metadata
{
"Cluster": "default",
"TaskARN": "arn:aws:ecs:us-west-2:012345678910:task/9781c248-0edd-4cdb-9a93-
f63cb662a5d3",
"Family": "nginx",
"Revision": "5",
"DesiredStatus": "RUNNING",
"KnownStatus": "RUNNING",
"Containers": [
{
"DockerId": "731a0d6a3b4210e2448339bc7015aaa",
"Name": "~internal~ecs~pause",
"DockerName": "ecs-nginx-5-internalecspause-1234",
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Debugging with Task Metadata
{
"Containers": [
{
"DockerId":
"731a0d6a3b4210e2448339bc7015aaa",
"Name": "~internal~ecs~pause",
"DockerName": "ecs-nginx-5-
internalecspause-1234",
"Image": "amazon/amazon-ecs-
pause:0.1.0",
"ImageID": "",
"Labels": {
"com.amazonaws.ecs.cluster":
"default",
"com.amazonaws.ecs.task-arn":
"com.amazonaws.ecs.task-definition-
family": "nginx",
"com.amazonaws.ecs.task-
definition-version": "5"
},
"DesiredStatus":
"RESOURCES_PROVISIONED",
"KnownStatus":
"RESOURCES_PROVISIONED",
"Limits": {
"CPU": 512,
"Memory": 512
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Lessons learned
• AWS Fargate is a container compute engine. It is available as a launch type for
Amazon ECS to run containers without having to manage EC2 instances.
• Monitoring and Alarming is critical for understanding the state of your system
and knowing when something goes wrong.
• AWS ecosystem has a variety of tools dedicated to improving the visibility of
your application health using AWS Fargate.
• In this session, we learned how to use Amazon ECS with Fargate and use
Amazon CloudWatch, Amazon CloudTrail and AWS X-Ray to help us identify
and diagnose events.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Catalytic’s parallelized bioinformatics
workflows with Fargate
C O N 3 1 2 - R
Karly Sindy
R&D Software Developer
Catalytic Data Science
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Magpie: A Multiplexed Automated Gene Editing Pipeline
prototype to production
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Gene editing systems: site-specific
GTGCACCTGACTCCTGTGGAGAAGTCTGCCGTTACT
GTGCACCTGACTCCTGAGGAGAAGTCTGCCGTTACT
mutation
…TCCTGAGGAGA…
repaired
…TCCTGTGGAGA…
not repaired
collect —> NGS
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Magpie - analysis of gene editing systems
CACCTGACTCCTGAGGAGAAGTCTGCCGTTACT
GTGCACCTGACTCCTGAGGAGAAGTCTGCCGTTA
GTGCACCTGACTCCTGAGGAGAAGTCTGCC
ACTCCTGTGGAGAAGTCTGCCGTTACT
GTGCACCTGACTCCTGAGGAGAAGTCTGC
ACCTGACTCCTGTGGAGAAGTCTGCCGTTA
GTGCACCTGACTCCTGTGGAGAAGTCTGCCGTTACT
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Customer request
Faster!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Prototype: parallel runs
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Fargate Benefits
Parallel runs means parallel results.
Better for sporatic application load:
financially and in developer time.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Lessons learned
Available CLIs
Plan for limited task size and quota.
Reduce docker image size for quicker startup.
Create cleanup cron for runaway tasks.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Task definition: ecs-cli compose
task_definition:
ecs_network_mode: awsvpc
task_role_arn: $ecsTaskRoleArn
task_execution_role: $ecsTaskExecutionRole
task_size:
cpu_limit: 4096
mem_limit: 8GB
services:
magpie:
essential: true
run_params:
network_configuration:
awsvpc_configuration:
subnets:
ecs-params.yml snippet
version: ‘2’
services:
magpie:
image: <xxx.ecr.us-east-
1.amazon.com/magpie>
ports:
- "8000:8000"
logging:
driver: awslogs
options:
awslogs-group: magpie-log
awslogs-region: us-east-1
awslogs-stream-prefix: ecs
docker-compose.yml snippet
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Run task: lambda
client.run_task(
cluster=ecs_cluster_name,
taskDefinition=task_definition_arn,
overrides=params,
launchType='FARGATE',
networkConfiguration={
'awsvpcConfiguration': {
'subnets': [
ecs_task_vpc_subnet_1,
ecs_task_vpc_subnet_2 ],
}
}
)
lambda function snippet
Cluster : demo-tasks
magpie:248772e-j879-4…
demo-tasks
magpie:24
family:magpie
x.x.x.x
x.x.x.x
x:x:x:x:x:x
magpie xxx.ecr.us-east-1.am...
demo-magpie-log
amplicon
magpie
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Requirements for production
Fault Tolerance
Retry when hit task limit or other infra error.
Recall Past Processes
Dynamically workflow applications together.
Visibility
Visually track errors and progress with asynchronous workflows.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Production: Amazon Dynamo, AWS Step Functions, and AWS Fargate
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Incorporating complex workflows
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Visibility
Monitoring
Amazon DynamoDB, AWS Step Function,
Amazon ECS
$ aws dynamodb scan --table-name analytic-cdsqab-run
--filter-expression "(contains(runStatus,:runStatus))"
--expression-attribute-values '{":runStatus":{"S":"ERROR"}}'
--projection-expression "batchId"
demo-tasks >
demo >
Cluster : demo
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Visibility
Debug
Amazon DynamoDB, AWS Step Functions
Monitoring
Amazon DynamoDB, AWS Step Function,
Amazon ECS
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Visibility
Logs
Amazon CloudWatch
Debug
Amazon DynamoDB, AWS Step Functions
Monitoring
Amazon DynamoDB, AWS Step Function,
Amazon ECS
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Wish List
Fire and forget
In the spirit of serverless, automatically infrastructure errors in AWS Fargate, AWS Lambdas,
Amazon ECS, DBs.
Mount volume
Amazon EFS, NFS, Amazon EBS
Task-level metrics
Amazon ECS console
Thank you!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Uttara Sridhar
uttara@amazon.com
Karly Sindy
Karly.Sindy@CatalyticDS.com
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Más contenido relacionado

La actualidad más candente

Hands-On: Automating AWS Infrastructure with PowerShell (WIN308) - AWS re:Inv...
Hands-On: Automating AWS Infrastructure with PowerShell (WIN308) - AWS re:Inv...Hands-On: Automating AWS Infrastructure with PowerShell (WIN308) - AWS re:Inv...
Hands-On: Automating AWS Infrastructure with PowerShell (WIN308) - AWS re:Inv...Amazon Web Services
 
How to Use Predictive Scaling (API331-R1) - AWS re:Invent 2018
How to Use Predictive Scaling (API331-R1) - AWS re:Invent 2018How to Use Predictive Scaling (API331-R1) - AWS re:Invent 2018
How to Use Predictive Scaling (API331-R1) - AWS re:Invent 2018Amazon Web Services
 
AWS, I Choose You: Pokemon's Battle against the Bots (SEC402-R1) - AWS re:Inv...
AWS, I Choose You: Pokemon's Battle against the Bots (SEC402-R1) - AWS re:Inv...AWS, I Choose You: Pokemon's Battle against the Bots (SEC402-R1) - AWS re:Inv...
AWS, I Choose You: Pokemon's Battle against the Bots (SEC402-R1) - AWS re:Inv...Amazon Web Services
 
Operations for Containerized Applications (CON334-R1) - AWS re:Invent 2018
Operations for Containerized Applications (CON334-R1) - AWS re:Invent 2018Operations for Containerized Applications (CON334-R1) - AWS re:Invent 2018
Operations for Containerized Applications (CON334-R1) - AWS re:Invent 2018Amazon Web Services
 
Deep Dive on Cloud File System Offerings: What to Use, Where, and Why (STG392...
Deep Dive on Cloud File System Offerings: What to Use, Where, and Why (STG392...Deep Dive on Cloud File System Offerings: What to Use, Where, and Why (STG392...
Deep Dive on Cloud File System Offerings: What to Use, Where, and Why (STG392...Amazon Web Services
 
Pause and Resume your EC2 Instances with Hibernate (CMP392) - AWS re:Invent 2018
Pause and Resume your EC2 Instances with Hibernate (CMP392) - AWS re:Invent 2018Pause and Resume your EC2 Instances with Hibernate (CMP392) - AWS re:Invent 2018
Pause and Resume your EC2 Instances with Hibernate (CMP392) - AWS re:Invent 2018Amazon Web Services
 
Autonomous DevSecOps: Five Steps to a Self-Driving Cloud (ENT214-S) - AWS re:...
Autonomous DevSecOps: Five Steps to a Self-Driving Cloud (ENT214-S) - AWS re:...Autonomous DevSecOps: Five Steps to a Self-Driving Cloud (ENT214-S) - AWS re:...
Autonomous DevSecOps: Five Steps to a Self-Driving Cloud (ENT214-S) - AWS re:...Amazon Web Services
 
AWS and Symantec: Cyber Defense at Scale (SEC311-S) - AWS re:Invent 2018
AWS and Symantec: Cyber Defense at Scale (SEC311-S) - AWS re:Invent 2018AWS and Symantec: Cyber Defense at Scale (SEC311-S) - AWS re:Invent 2018
AWS and Symantec: Cyber Defense at Scale (SEC311-S) - AWS re:Invent 2018Amazon Web Services
 
使用 AWS Step Functions 靈活調度 AWS Lambda (Level:200)
使用 AWS Step Functions 靈活調度 AWS Lambda (Level:200)使用 AWS Step Functions 靈活調度 AWS Lambda (Level:200)
使用 AWS Step Functions 靈活調度 AWS Lambda (Level:200)Amazon Web Services
 
Architecting Next Generation Serverless SaaS Solutions on AWS (ARC324-R1) - A...
Architecting Next Generation Serverless SaaS Solutions on AWS (ARC324-R1) - A...Architecting Next Generation Serverless SaaS Solutions on AWS (ARC324-R1) - A...
Architecting Next Generation Serverless SaaS Solutions on AWS (ARC324-R1) - A...Amazon Web Services
 
[NEW LAUNCH!] Deep Dive on Amazon FSx for Windows File Server (STG322-R) - AW...
[NEW LAUNCH!] Deep Dive on Amazon FSx for Windows File Server (STG322-R) - AW...[NEW LAUNCH!] Deep Dive on Amazon FSx for Windows File Server (STG322-R) - AW...
[NEW LAUNCH!] Deep Dive on Amazon FSx for Windows File Server (STG322-R) - AW...Amazon Web Services
 
Securing Your Virtual Data Center in the Cloud (NET202) - AWS re:Invent 2018
Securing Your Virtual Data Center in the Cloud (NET202) - AWS re:Invent 2018Securing Your Virtual Data Center in the Cloud (NET202) - AWS re:Invent 2018
Securing Your Virtual Data Center in the Cloud (NET202) - AWS re:Invent 2018Amazon Web Services
 
Petabyte-Scale Migration to Amazon S3 Building Photobox's Data Lake (STG393) ...
Petabyte-Scale Migration to Amazon S3 Building Photobox's Data Lake (STG393) ...Petabyte-Scale Migration to Amazon S3 Building Photobox's Data Lake (STG393) ...
Petabyte-Scale Migration to Amazon S3 Building Photobox's Data Lake (STG393) ...Amazon Web Services
 
Ripping off the Bandage: Re-Architecting Traditional Three-Tier Monoliths to ...
Ripping off the Bandage: Re-Architecting Traditional Three-Tier Monoliths to ...Ripping off the Bandage: Re-Architecting Traditional Three-Tier Monoliths to ...
Ripping off the Bandage: Re-Architecting Traditional Three-Tier Monoliths to ...Amazon Web Services
 
Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...
Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...
Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...Amazon Web Services
 
Scalable, Automated Anomaly Detection with GuardDuty, CloudTrail, & Amazon Sa...
Scalable, Automated Anomaly Detection with GuardDuty, CloudTrail, & Amazon Sa...Scalable, Automated Anomaly Detection with GuardDuty, CloudTrail, & Amazon Sa...
Scalable, Automated Anomaly Detection with GuardDuty, CloudTrail, & Amazon Sa...Amazon Web Services
 
Machine Learning at the IoT Edge (IOT214) - AWS re:Invent 2018
Machine Learning at the IoT Edge (IOT214) - AWS re:Invent 2018Machine Learning at the IoT Edge (IOT214) - AWS re:Invent 2018
Machine Learning at the IoT Edge (IOT214) - AWS re:Invent 2018Amazon Web Services
 
Leadership Session: Learn about 10 Years' of Windows and .NET Innovation on A...
Leadership Session: Learn about 10 Years' of Windows and .NET Innovation on A...Leadership Session: Learn about 10 Years' of Windows and .NET Innovation on A...
Leadership Session: Learn about 10 Years' of Windows and .NET Innovation on A...Amazon Web Services
 
Have Your Front End and Monitor It, Too (ANT303) - AWS re:Invent 2018
Have Your Front End and Monitor It, Too (ANT303) - AWS re:Invent 2018Have Your Front End and Monitor It, Too (ANT303) - AWS re:Invent 2018
Have Your Front End and Monitor It, Too (ANT303) - AWS re:Invent 2018Amazon Web Services
 
Workshop: Architecting a Serverless Data Lake
Workshop: Architecting a Serverless Data LakeWorkshop: Architecting a Serverless Data Lake
Workshop: Architecting a Serverless Data LakeAmazon Web Services
 

La actualidad más candente (20)

Hands-On: Automating AWS Infrastructure with PowerShell (WIN308) - AWS re:Inv...
Hands-On: Automating AWS Infrastructure with PowerShell (WIN308) - AWS re:Inv...Hands-On: Automating AWS Infrastructure with PowerShell (WIN308) - AWS re:Inv...
Hands-On: Automating AWS Infrastructure with PowerShell (WIN308) - AWS re:Inv...
 
How to Use Predictive Scaling (API331-R1) - AWS re:Invent 2018
How to Use Predictive Scaling (API331-R1) - AWS re:Invent 2018How to Use Predictive Scaling (API331-R1) - AWS re:Invent 2018
How to Use Predictive Scaling (API331-R1) - AWS re:Invent 2018
 
AWS, I Choose You: Pokemon's Battle against the Bots (SEC402-R1) - AWS re:Inv...
AWS, I Choose You: Pokemon's Battle against the Bots (SEC402-R1) - AWS re:Inv...AWS, I Choose You: Pokemon's Battle against the Bots (SEC402-R1) - AWS re:Inv...
AWS, I Choose You: Pokemon's Battle against the Bots (SEC402-R1) - AWS re:Inv...
 
Operations for Containerized Applications (CON334-R1) - AWS re:Invent 2018
Operations for Containerized Applications (CON334-R1) - AWS re:Invent 2018Operations for Containerized Applications (CON334-R1) - AWS re:Invent 2018
Operations for Containerized Applications (CON334-R1) - AWS re:Invent 2018
 
Deep Dive on Cloud File System Offerings: What to Use, Where, and Why (STG392...
Deep Dive on Cloud File System Offerings: What to Use, Where, and Why (STG392...Deep Dive on Cloud File System Offerings: What to Use, Where, and Why (STG392...
Deep Dive on Cloud File System Offerings: What to Use, Where, and Why (STG392...
 
Pause and Resume your EC2 Instances with Hibernate (CMP392) - AWS re:Invent 2018
Pause and Resume your EC2 Instances with Hibernate (CMP392) - AWS re:Invent 2018Pause and Resume your EC2 Instances with Hibernate (CMP392) - AWS re:Invent 2018
Pause and Resume your EC2 Instances with Hibernate (CMP392) - AWS re:Invent 2018
 
Autonomous DevSecOps: Five Steps to a Self-Driving Cloud (ENT214-S) - AWS re:...
Autonomous DevSecOps: Five Steps to a Self-Driving Cloud (ENT214-S) - AWS re:...Autonomous DevSecOps: Five Steps to a Self-Driving Cloud (ENT214-S) - AWS re:...
Autonomous DevSecOps: Five Steps to a Self-Driving Cloud (ENT214-S) - AWS re:...
 
AWS and Symantec: Cyber Defense at Scale (SEC311-S) - AWS re:Invent 2018
AWS and Symantec: Cyber Defense at Scale (SEC311-S) - AWS re:Invent 2018AWS and Symantec: Cyber Defense at Scale (SEC311-S) - AWS re:Invent 2018
AWS and Symantec: Cyber Defense at Scale (SEC311-S) - AWS re:Invent 2018
 
使用 AWS Step Functions 靈活調度 AWS Lambda (Level:200)
使用 AWS Step Functions 靈活調度 AWS Lambda (Level:200)使用 AWS Step Functions 靈活調度 AWS Lambda (Level:200)
使用 AWS Step Functions 靈活調度 AWS Lambda (Level:200)
 
Architecting Next Generation Serverless SaaS Solutions on AWS (ARC324-R1) - A...
Architecting Next Generation Serverless SaaS Solutions on AWS (ARC324-R1) - A...Architecting Next Generation Serverless SaaS Solutions on AWS (ARC324-R1) - A...
Architecting Next Generation Serverless SaaS Solutions on AWS (ARC324-R1) - A...
 
[NEW LAUNCH!] Deep Dive on Amazon FSx for Windows File Server (STG322-R) - AW...
[NEW LAUNCH!] Deep Dive on Amazon FSx for Windows File Server (STG322-R) - AW...[NEW LAUNCH!] Deep Dive on Amazon FSx for Windows File Server (STG322-R) - AW...
[NEW LAUNCH!] Deep Dive on Amazon FSx for Windows File Server (STG322-R) - AW...
 
Securing Your Virtual Data Center in the Cloud (NET202) - AWS re:Invent 2018
Securing Your Virtual Data Center in the Cloud (NET202) - AWS re:Invent 2018Securing Your Virtual Data Center in the Cloud (NET202) - AWS re:Invent 2018
Securing Your Virtual Data Center in the Cloud (NET202) - AWS re:Invent 2018
 
Petabyte-Scale Migration to Amazon S3 Building Photobox's Data Lake (STG393) ...
Petabyte-Scale Migration to Amazon S3 Building Photobox's Data Lake (STG393) ...Petabyte-Scale Migration to Amazon S3 Building Photobox's Data Lake (STG393) ...
Petabyte-Scale Migration to Amazon S3 Building Photobox's Data Lake (STG393) ...
 
Ripping off the Bandage: Re-Architecting Traditional Three-Tier Monoliths to ...
Ripping off the Bandage: Re-Architecting Traditional Three-Tier Monoliths to ...Ripping off the Bandage: Re-Architecting Traditional Three-Tier Monoliths to ...
Ripping off the Bandage: Re-Architecting Traditional Three-Tier Monoliths to ...
 
Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...
Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...
Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...
 
Scalable, Automated Anomaly Detection with GuardDuty, CloudTrail, & Amazon Sa...
Scalable, Automated Anomaly Detection with GuardDuty, CloudTrail, & Amazon Sa...Scalable, Automated Anomaly Detection with GuardDuty, CloudTrail, & Amazon Sa...
Scalable, Automated Anomaly Detection with GuardDuty, CloudTrail, & Amazon Sa...
 
Machine Learning at the IoT Edge (IOT214) - AWS re:Invent 2018
Machine Learning at the IoT Edge (IOT214) - AWS re:Invent 2018Machine Learning at the IoT Edge (IOT214) - AWS re:Invent 2018
Machine Learning at the IoT Edge (IOT214) - AWS re:Invent 2018
 
Leadership Session: Learn about 10 Years' of Windows and .NET Innovation on A...
Leadership Session: Learn about 10 Years' of Windows and .NET Innovation on A...Leadership Session: Learn about 10 Years' of Windows and .NET Innovation on A...
Leadership Session: Learn about 10 Years' of Windows and .NET Innovation on A...
 
Have Your Front End and Monitor It, Too (ANT303) - AWS re:Invent 2018
Have Your Front End and Monitor It, Too (ANT303) - AWS re:Invent 2018Have Your Front End and Monitor It, Too (ANT303) - AWS re:Invent 2018
Have Your Front End and Monitor It, Too (ANT303) - AWS re:Invent 2018
 
Workshop: Architecting a Serverless Data Lake
Workshop: Architecting a Serverless Data LakeWorkshop: Architecting a Serverless Data Lake
Workshop: Architecting a Serverless Data Lake
 

Similar a Visibility into Serverless Applications built using AWS Fargate (CON312-R1) - AWS re:Invent 2018

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
 
AWS18 Startup Day Toronto- The Best Practices and Hard Lessons Learned of Ser...
AWS18 Startup Day Toronto- The Best Practices and Hard Lessons Learned of Ser...AWS18 Startup Day Toronto- The Best Practices and Hard Lessons Learned of Ser...
AWS18 Startup Day Toronto- The Best Practices and Hard Lessons Learned of Ser...Amazon Web Services
 
2018 10-19-jc conf-embrace-legacy-java-ee-by-aws-serverless
2018 10-19-jc conf-embrace-legacy-java-ee-by-aws-serverless2018 10-19-jc conf-embrace-legacy-java-ee-by-aws-serverless
2018 10-19-jc conf-embrace-legacy-java-ee-by-aws-serverlessKim Kao
 
Getting started with Amazon ECS
Getting started with Amazon ECSGetting started with Amazon ECS
Getting started with Amazon ECSIoannis Polyzos
 
The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...
The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...
The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...Amazon Web Services
 
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...Chris Munns
 
Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...
Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...
Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...Amazon Web Services
 
Data freedom: come migrare i carichi di lavoro Big Data su AWS
Data freedom: come migrare i carichi di lavoro Big Data su AWSData freedom: come migrare i carichi di lavoro Big Data su AWS
Data freedom: come migrare i carichi di lavoro Big Data su AWSAmazon Web Services
 
Scalable and Fault-Tolerant Apps with AWS
Scalable and Fault-Tolerant Apps with AWSScalable and Fault-Tolerant Apps with AWS
Scalable and Fault-Tolerant Apps with AWSFernando Rodriguez
 
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...Amazon Web Services Korea
 
Introduction to GraphQL and AWS Appsync on AWS - iOS
Introduction to GraphQL and AWS Appsync on AWS - iOSIntroduction to GraphQL and AWS Appsync on AWS - iOS
Introduction to GraphQL and AWS Appsync on AWS - iOSAmazon Web Services
 
Mythical Mysfits: Monolith to Microservice with Docker and AWS Fargate (CON21...
Mythical Mysfits: Monolith to Microservice with Docker and AWS Fargate (CON21...Mythical Mysfits: Monolith to Microservice with Docker and AWS Fargate (CON21...
Mythical Mysfits: Monolith to Microservice with Docker and AWS Fargate (CON21...Amazon Web Services
 
Aws summit devops 云端多环境自动化运维和部署
Aws summit devops   云端多环境自动化运维和部署Aws summit devops   云端多环境自动化运维和部署
Aws summit devops 云端多环境自动化运维和部署Leon Li
 
Reinventing Amazon EC2 Instance Launches with Launch Templates (CMP369-R1) - ...
Reinventing Amazon EC2 Instance Launches with Launch Templates (CMP369-R1) - ...Reinventing Amazon EC2 Instance Launches with Launch Templates (CMP369-R1) - ...
Reinventing Amazon EC2 Instance Launches with Launch Templates (CMP369-R1) - ...Amazon Web Services
 
Deep Dive on Amazon Elastic Container Service (ECS) | AWS Summit Tel Aviv 2019
Deep Dive on Amazon Elastic Container Service (ECS)  | AWS Summit Tel Aviv 2019Deep Dive on Amazon Elastic Container Service (ECS)  | AWS Summit Tel Aviv 2019
Deep Dive on Amazon Elastic Container Service (ECS) | AWS Summit Tel Aviv 2019Amazon Web Services
 
Deep Dive on Amazon Elastic Container Service (ECS) | AWS Summit Tel Aviv 2019
Deep Dive on Amazon Elastic Container Service (ECS)  | AWS Summit Tel Aviv 2019Deep Dive on Amazon Elastic Container Service (ECS)  | AWS Summit Tel Aviv 2019
Deep Dive on Amazon Elastic Container Service (ECS) | AWS Summit Tel Aviv 2019AWS Summits
 
Building Serverless Container Applications using AWS Fargate and CDK
Building Serverless Container Applications using AWS Fargate and CDK Building Serverless Container Applications using AWS Fargate and CDK
Building Serverless Container Applications using AWS Fargate and CDK Amazon Web Services
 
Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...
Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...
Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...Amazon Web Services
 
Architecting ASP.NET Core Microservices Applications on AWS (WIN401) - AWS re...
Architecting ASP.NET Core Microservices Applications on AWS (WIN401) - AWS re...Architecting ASP.NET Core Microservices Applications on AWS (WIN401) - AWS re...
Architecting ASP.NET Core Microservices Applications on AWS (WIN401) - AWS re...Amazon Web Services
 

Similar a Visibility into Serverless Applications built using AWS Fargate (CON312-R1) - AWS re:Invent 2018 (20)

Deep dive ECS & Fargate Deep Dive
Deep dive ECS & Fargate Deep DiveDeep dive ECS & Fargate Deep Dive
Deep dive ECS & Fargate Deep Dive
 
AWS18 Startup Day Toronto- The Best Practices and Hard Lessons Learned of Ser...
AWS18 Startup Day Toronto- The Best Practices and Hard Lessons Learned of Ser...AWS18 Startup Day Toronto- The Best Practices and Hard Lessons Learned of Ser...
AWS18 Startup Day Toronto- The Best Practices and Hard Lessons Learned of Ser...
 
2018 10-19-jc conf-embrace-legacy-java-ee-by-aws-serverless
2018 10-19-jc conf-embrace-legacy-java-ee-by-aws-serverless2018 10-19-jc conf-embrace-legacy-java-ee-by-aws-serverless
2018 10-19-jc conf-embrace-legacy-java-ee-by-aws-serverless
 
Getting started with Amazon ECS
Getting started with Amazon ECSGetting started with Amazon ECS
Getting started with Amazon ECS
 
The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...
The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...
The Best Practices and Hard Lessons Learned of Serverless Applications - AWS ...
 
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...
 
Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...
Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...
Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...
 
Data freedom: come migrare i carichi di lavoro Big Data su AWS
Data freedom: come migrare i carichi di lavoro Big Data su AWSData freedom: come migrare i carichi di lavoro Big Data su AWS
Data freedom: come migrare i carichi di lavoro Big Data su AWS
 
Scalable and Fault-Tolerant Apps with AWS
Scalable and Fault-Tolerant Apps with AWSScalable and Fault-Tolerant Apps with AWS
Scalable and Fault-Tolerant Apps with AWS
 
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...
 
Introduction to GraphQL and AWS Appsync on AWS - iOS
Introduction to GraphQL and AWS Appsync on AWS - iOSIntroduction to GraphQL and AWS Appsync on AWS - iOS
Introduction to GraphQL and AWS Appsync on AWS - iOS
 
Mythical Mysfits: Monolith to Microservice with Docker and AWS Fargate (CON21...
Mythical Mysfits: Monolith to Microservice with Docker and AWS Fargate (CON21...Mythical Mysfits: Monolith to Microservice with Docker and AWS Fargate (CON21...
Mythical Mysfits: Monolith to Microservice with Docker and AWS Fargate (CON21...
 
Aws summit devops 云端多环境自动化运维和部署
Aws summit devops   云端多环境自动化运维和部署Aws summit devops   云端多环境自动化运维和部署
Aws summit devops 云端多环境自动化运维和部署
 
Reinventing Amazon EC2 Instance Launches with Launch Templates (CMP369-R1) - ...
Reinventing Amazon EC2 Instance Launches with Launch Templates (CMP369-R1) - ...Reinventing Amazon EC2 Instance Launches with Launch Templates (CMP369-R1) - ...
Reinventing Amazon EC2 Instance Launches with Launch Templates (CMP369-R1) - ...
 
Introducing AWS Fargate
Introducing AWS FargateIntroducing AWS Fargate
Introducing AWS Fargate
 
Deep Dive on Amazon Elastic Container Service (ECS) | AWS Summit Tel Aviv 2019
Deep Dive on Amazon Elastic Container Service (ECS)  | AWS Summit Tel Aviv 2019Deep Dive on Amazon Elastic Container Service (ECS)  | AWS Summit Tel Aviv 2019
Deep Dive on Amazon Elastic Container Service (ECS) | AWS Summit Tel Aviv 2019
 
Deep Dive on Amazon Elastic Container Service (ECS) | AWS Summit Tel Aviv 2019
Deep Dive on Amazon Elastic Container Service (ECS)  | AWS Summit Tel Aviv 2019Deep Dive on Amazon Elastic Container Service (ECS)  | AWS Summit Tel Aviv 2019
Deep Dive on Amazon Elastic Container Service (ECS) | AWS Summit Tel Aviv 2019
 
Building Serverless Container Applications using AWS Fargate and CDK
Building Serverless Container Applications using AWS Fargate and CDK Building Serverless Container Applications using AWS Fargate and CDK
Building Serverless Container Applications using AWS Fargate and CDK
 
Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...
Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...
Disaster Recovery Site on AWS - Minimal Cost Maximum Efficiency (STG305) | AW...
 
Architecting ASP.NET Core Microservices Applications on AWS (WIN401) - AWS re...
Architecting ASP.NET Core Microservices Applications on AWS (WIN401) - AWS re...Architecting ASP.NET Core Microservices Applications on AWS (WIN401) - AWS re...
Architecting ASP.NET Core Microservices Applications on AWS (WIN401) - AWS re...
 

Más 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
 

Más 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
 

Visibility into Serverless Applications built using AWS Fargate (CON312-R1) - AWS re:Invent 2018

  • 1.
  • 2. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Visibility into Serverless Applications built using AWS Fargate Uttara Sridhar Senior Software Engineer Amazon C O N 3 1 2 - R Karly Sindy R&D Software Engineer Catalytic Data Science
  • 3. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Agenda Sample application on AWS Fargate Visibility Aspects Logging Monitoring Debugging Catalytic’s parallelized bioinformatics workflows with Fargate
  • 4. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 5. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Scorekeep Application Creates and manages game sessions and users Backend Business logic Stores state in DynamoDB Frontend Page elements built using Angular nginx to serve pages and route /api requests to backend
  • 6. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 7. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Serverless Containers Why Containers? Portable Flexible Fast Efficient Why Serverless? No instance management Faster time-to-market Scalable Pay for use
  • 8. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Fargate Simple, easy to use, powerful consumption model Resource based pricing No instances to manage Container native APIFargate
  • 9. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Availability Zone #1 Availability Zone #2 Availability Zone #3 Scheduling and Orchestration Cluster Manager Placement Engine Amazon ECS supports AWS Fargate
  • 10. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon ECS supports AWS Fargate EC2 Instance ECS AMI Docker agent ECS agent EC2 Instance ECS AMI Docker agent ECS agent EC2 Instance ECS AMI Docker agent ECS agent Scheduling and Orchestration Cluster Manager Placement Engine
  • 11. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Benefits MANAGED by AWS No Amazon EC2 Instances to provision, scale or manage. ELASTIC Scale up & down seamlessly. Pay only for what you use. INTEGRATED with the AWS ecosystem: VPC Networking, Amazon Elastic Load Balancing, AWS IAM Permissions, Amazon CloudWatch and more. Your Docker Containers
  • 12. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 13. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Scorekeep Application Architecture https://github.com/aws-samples/eb-java-scorekeep/tree/fargate Frontend Server Container Angular + Nginx API Server Container Java Port 8080 Port 5000 Internet
  • 14. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Application Building Blocks Compute Networking * CPU units * Memory * Storage Security * Amazon VPC * Subnets * Internet, NAT Gateways * Route tables * Elastic Network Interface * AWS IAM Permissions * Security groups * How to know the health of my application? * How to measure latencies, error rate, call volume? * How to automatically alert application owners? * How to troubleshoot? Visibility
  • 15. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Scorekeep Application with AWS Fargate Amazon ECS Task Definition: { "family": "scorekeep", "cpu": "1 vCpu", "memory": "2 gb", "networkMode":"awsvpc", "taskRoleArn": "arn:aws:…", "executionRoleArn”: “arn:…” "requiresCompatibilities": [ "FARGATE" ], "containerDefinitions": [ { "name": "scorekeep-frontend", "image":“xxx.dkr.ecr…frontend", "cpu": 256, "memoryReservation": 512, "portMappings" : [ { "containerPort": 8080 } ], "logConfiguration": { "logDriver": "awslogs", "options": { "awslogs-group": "scorekeep", "awslogs-region": "us-east-1", "awslogs-stream-prefix": "scorekeep/frontend” } } } ]} { "name": "scorekeep-api", "image":“xxx.dkr.ecr…api", "cpu": 768, "memoryReservation": 512, "portMappings" : [ { "containerPort": 5000 } ], "environment": […], #env var "logConfiguration": { "logDriver": "awslogs", "options": { “awslogs-group": "scorekeep", "awslogs-region": "us-east-1", "awslogs-stream-prefix": "scorekeep/api” } } },
  • 16. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Scorekeep Application with AWS Fargate Amazon ECS Task Definition: Compute { "family": "scorekeep", "cpu": "1 vCpu", "memory": "2 gb", "networkMode":"awsvpc", "taskRoleArn": "arn:aws:…", "executionRoleArn”: “arn:…” "requiresCompatibilities": [ "FARGATE" ], "containerDefinitions": [ { "name": "scorekeep-frontend", "image":“xxx.dkr.ecr…frontend", "cpu": 256, "memoryReservation": 512, "portMappings" : [ { "containerPort": 8080 } ], "logConfiguration": { "logDriver": "awslogs", "options": { "awslogs-group": "scorekeep", "awslogs-region": "us-east-1", "awslogs-stream-prefix": "scorekeep/frontend” } } } ]} { "name": "scorekeep-api", "image":“xxx.dkr.ecr…api", "cpu": 768, "memoryReservation": 512, "portMappings" : [ { "containerPort": 5000 } ], "environment": […], #env var "logConfiguration": { "logDriver": "awslogs", "options": { “awslogs-group": "scorekeep", "awslogs-region": "us-east-1", "awslogs-stream-prefix": "scorekeep/api” } } },
  • 17. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Scorekeep Application with AWS Fargate Amazon ECS Task Definition: Networking { "family": "scorekeep", "cpu": "1 vCpu", "memory": "2 gb", "networkMode":"awsvpc", "taskRoleArn": "arn:aws:…", "executionRoleArn”: “arn:…” "requiresCompatibilities": [ "FARGATE" ], "containerDefinitions": [ { "name": "scorekeep-frontend", "image":“xxx.dkr.ecr…frontend", "cpu": 256, "memoryReservation": 512, "portMappings" : [ { "containerPort": 8080 } ], "logConfiguration": { "logDriver": "awslogs", "options": { "awslogs-group": "scorekeep", "awslogs-region": "us-east-1", "awslogs-stream-prefix": "scorekeep/frontend” } } } ]} { "name": "scorekeep-api", "image":“xxx.dkr.ecr…api", "cpu": 768, "memoryReservation": 512, "portMappings" : [ { "containerPort": 5000 } ], "environment": […], #env var "logConfiguration": { "logDriver": "awslogs", "options": { “awslogs-group": "scorekeep", "awslogs-region": "us-east-1", "awslogs-stream-prefix": "scorekeep/api” } } },
  • 18. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Scorekeep Application with AWS Fargate Amazon ECS Task Definition: Security { "family": "scorekeep", "cpu": "1 vCpu", "memory": "2 gb", "networkMode":"awsvpc", "taskRoleArn": "arn:aws:…", "executionRoleArn”: “arn:…” "requiresCompatibilities": [ "FARGATE" ], "containerDefinitions": [ { "name": "scorekeep-frontend", "image":“xxx.dkr.ecr…frontend", "cpu": 256, "memoryReservation": 512, "portMappings" : [ { "containerPort": 8080 } ], "logConfiguration": { "logDriver": "awslogs", "options": { "awslogs-group": "scorekeep", "awslogs-region": "us-east-1", "awslogs-stream-prefix": "scorekeep/frontend” } } } ]} { "name": "scorekeep-api", "image":“xxx.dkr.ecr…api", "cpu": 768, "memoryReservation": 512, "portMappings" : [ { "containerPort": 5000 } ], "environment": […], #env var "logConfiguration": { "logDriver": "awslogs", "options": { “awslogs-group": "scorekeep", "awslogs-region": "us-east-1", "awslogs-stream-prefix": "scorekeep/api” } } },
  • 19. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Scorekeep Application with AWS Fargate Amazon ECS Task Definition: Visibility { "family": "scorekeep", "cpu": "1 vCpu", "memory": "2 gb", "networkMode":"awsvpc", "taskRoleArn": "arn:aws:…", "executionRoleArn”: “arn:…” "requiresCompatibilities": [ "FARGATE" ], "containerDefinitions": [ { "name": "scorekeep-frontend", "image":“xxx.dkr.ecr…frontend", "cpu": 256, "memoryReservation": 512, "portMappings" : [ { "containerPort": 8080 } ], "logConfiguration": { "logDriver": "awslogs", "options": { "awslogs-group": "scorekeep", "awslogs-region": "us-east-1", "awslogs-stream-prefix": "scorekeep/frontend” } } } ]} { "name": "scorekeep-api", "image":“xxx.dkr.ecr…api", "cpu": 768, "memoryReservation": 512, "portMappings" : [ { "containerPort": 5000 } ], "environment": […], #env var "logConfiguration": { "logDriver": "awslogs", "options": { “awslogs-group": "scorekeep", "awslogs-region": "us-east-1", "awslogs-stream-prefix": "scorekeep/api” } } },
  • 20. Scorekeep Application with AWS Fargate # Register Task Definition $ aws ecs register-task-definition --cli-input-json file:///scorekeep-task- definition.json # Create Cluster $ aws ecs create-cluster --cluster-name FargateDemoCluster # Create Service $ aws ecs create-service --service-name ScorekeepService --cluster FargateDemoCluster --task-definition scorekeep:1 --launch-type FARGATE –desired-count 5 --network-configuration # Networking "awsvpcConfiguration={subnets=[subnet-xxx], securityGroups=[sg-xxx]}“ --load-balancer “[{"targetGroupArn":“arn:aws:xxx", "containerName":“scorekeep-frontend", "containerPort":8080}]”
  • 21. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Scorekeep Application Frontend Server Container Angular + Nginx API Server Container Java Port 8080 Port 5000 Internet
  • 22. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 23. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Visibility Aspects Logging Monitoring Debugging
  • 24. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Visibility Aspects Monitoring DebuggingLogging
  • 25. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Logging Critical component to our diagnostics and monitoring Enforce best practices to logging Provide as much relevant information Avoid spamming Use appropriate log levels: fatal, error, warning
  • 26. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Logging Send application logs to a logging framework AWS Fargate supports Amazon CloudWatch log driver Track user activity and API usage AWS CloudTrail Tracing application requests AWS X-Ray
  • 27. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Logging with Amazon CloudWatch Use the awslogs driver to send stdout from your application to Cloudwatch logs Create a log group in Cloudwatch Configure the log driver in your task definition Remember to add permissions via the Task Execution Role
  • 28. Logging with AWS CloudTrail { "EventId": "89baa6bb-9380-4983-9670-5688359abbb9", "EventName": "DescribeServices", "EventTime": 1542301015.0, "EventSource": "ecs.amazonaws.com", "Username": "root", "Resources": [], "CloudTrailEvent": "{"eventVersion":"1.04","userIdentity":{"type":"Root","principalId":”xxxx", "arn":"arn:aws:iam::xxxx:root","accountId":”xxxx","accessKeyId":”xxxx","sess ionContext":{"attributes":{"mfaAuthenticated":"false","creationDate":"2018-11- 15T07:26:14Z"}}},"eventTime":"2018-11- 15T16:56:55Z","eventSource":"ecs.amazonaws.com","eventName":"DescribeServices", "awsRegion":"eu-west- 1","sourceIPAddress":"172.92.129.249","userAgent":"console.amazonaws.com","requ estParameters":{"services":["scorekeep-service"],"cluster":"scorekeep- cluster"},"responseElements":null,"requestID":"5b38e298-2b16-427c-9b05- e60272ffa1a0","eventID":"89baa6bb-9380-4983-9670- 5688359abbb9","eventType":"AwsApiCall","recipientAccountId":”xxxx"}" }
  • 29. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Tracing with AWS X-Ray Create a Docker image that runs the daemon. Add managed policies to your task role to grant the daemon permission to upload trace data to X-Ray. Run it as a side-car container. Update Amazon ECS Task definition. Invoke Update Service. { "name": "xray-daemon", "image": ”xxxx.dkr.ecr.xxx.amazonaws.com/xray-daemon", "cpu": 32, "memoryReservation": 256, "portMappings" : [ { "containerPort": 2000, "protocol": "udp" }] }
  • 30. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Visibility Aspects DebuggingMonitoringLogging
  • 31. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Monitoring Metrics Measure availability, reliability and performance Instrument/profile your code Helpful for troubleshooting
  • 32. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Monitoring: Metrics Key Metrics Application metrics: Server-side/client-side latency, error rates, timeouts, CPU/memory, heartbeats Load balancers metrics: request count, connection count, 5xxs, 4xxs Dependency metrics: latency, error rates, timeouts, DB throughput Amazon CloudWatch Default Amazon ECS Metrics Metric data sent to CloudWatch in 1-minute periods and recorded for a period of two weeks Available metrics: CPUUtilization, MemoryUtilization Available dimensions: ClusterName,ServiceName Emit custom metrics, use Amazon CloudWatch metric filters
  • 33. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Monitoring: Metrics with Amazon CloudWatch
  • 34. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Monitoring Metrics Measure availability, reliability and performance Instrument/profile your code Helpful for troubleshooting Dashboards Monitor your resources in a single view Operational meetings
  • 35. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Monitoring: Dashboarding with Amazon CloudWatch
  • 36. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Monitoring: with Datadog Autodiscovery and AWS Fargate
  • 37. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Monitoring Metrics Measure availability, reliability and performance Instrument/profile your code Helpful for troubleshooting Dashboards Monitor your resources in a single view Operational meetings Alarms Automated alerts to notify threshold breaches Paging on-call, email notifications, or take autoscaling actions
  • 38. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Monitoring Metrics Measure availability, reliability and performance Instrument/profile your code Helpful for troubleshooting Dashboards Monitor your resources in a single view Operational meetings Alarms Automated alerts to notify threshold breaches Paging on-call, email notifications, or take autoscaling actions State Change Events Trace using Amazon CloudWatch Events
  • 39. Monitoring: with Amazon CloudWatch Events { "version": "0", "id": "d5e4d7c2-8b04-d387-ded5-779de044ce5b", "detail-type": "ECS Task State Change", "source": "aws.ecs", … "resources": [ "arn:aws:ecs:eu-west-1:xxx:task/8b813908-0e5f-4bc0-a901-65144ce6d9ef" ], "detail": { "stoppedReason": "Scaling activity initiated by (deployment ecs- svc/9223370498172059827)", "launchType": "FARGATE", "cpu": "1024", "memory": "2048", "desiredStatus": "STOPPED", "group": "service:scorekeep-service", "lastStatus": "STOPPED", "containers": […] … } }
  • 40. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Monitoring Metrics Measure availability, reliability and performance Instrument/profile your code Helpful for troubleshooting Dashboards Monitor your resources in a single view Operational meetings Alarms Automated alerts to notify threshold breaches Paging on-call, email notifications, or take autoscaling actions State Change Events Trace using Amazon CloudWatch Events Health Checks
  • 41. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Monitoring: with Container Health Checks - Define custom health check commands in the Amazon ECS Task Definition
  • 42. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Visibility Aspects Logging Monitoring Debugging
  • 43. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Debugging Amazon ECS APIs and Console • Task and container stopped reason • Task StateChange events using Amazon CloudWatch • Service events in describe-service payload
  • 44. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Debugging Task Limit Exceeded Request limit increase https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html
  • 45. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Debugging Container Pull Error Amazon ECS Troubleshooting Guide https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_cannot_pull_image.html
  • 46. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Debugging Amazon ECS APIs and Console • Task and container stopped reason • Task StateChange events using Amazon CloudWatch • Service events in describe-service payload Application Logs using Amazon CloudWatch
  • 47. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Debugging Amazon ECS APIs and Console • Task and container stopped reason • Task StateChange events using Amazon CloudWatch • Service events in describe-service payload Application Logs using Amazon CloudWatch Task Metadata API
  • 48. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Debugging with Task Metadata Query environmental data and statistics for running tasks from within the Task! Enables monitoring tools like Datadog, etc Endpoints available: Task Level (for all containers) 169.254.170.2/v2/metadata – Metadata JSON for Task 169.254.170.2/v2/stats - Docker stats JSON for all containers in the Task Container Level 169.254.170.2/v2/metadata/<container-id> 169.254.170.2/v2/stats/<container-id>
  • 49. Debugging with Task Metadata { "Cluster": "default", "TaskARN": "arn:aws:ecs:us-west-2:012345678910:task/9781c248-0edd-4cdb-9a93- f63cb662a5d3", "Family": "nginx", "Revision": "5", "DesiredStatus": "RUNNING", "KnownStatus": "RUNNING", "Containers": [ { "DockerId": "731a0d6a3b4210e2448339bc7015aaa", "Name": "~internal~ecs~pause", "DockerName": "ecs-nginx-5-internalecspause-1234",
  • 50. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Debugging with Task Metadata { "Containers": [ { "DockerId": "731a0d6a3b4210e2448339bc7015aaa", "Name": "~internal~ecs~pause", "DockerName": "ecs-nginx-5- internalecspause-1234", "Image": "amazon/amazon-ecs- pause:0.1.0", "ImageID": "", "Labels": { "com.amazonaws.ecs.cluster": "default", "com.amazonaws.ecs.task-arn": "com.amazonaws.ecs.task-definition- family": "nginx", "com.amazonaws.ecs.task- definition-version": "5" }, "DesiredStatus": "RESOURCES_PROVISIONED", "KnownStatus": "RESOURCES_PROVISIONED", "Limits": { "CPU": 512, "Memory": 512 }
  • 51. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 52. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Lessons learned • AWS Fargate is a container compute engine. It is available as a launch type for Amazon ECS to run containers without having to manage EC2 instances. • Monitoring and Alarming is critical for understanding the state of your system and knowing when something goes wrong. • AWS ecosystem has a variety of tools dedicated to improving the visibility of your application health using AWS Fargate. • In this session, we learned how to use Amazon ECS with Fargate and use Amazon CloudWatch, Amazon CloudTrail and AWS X-Ray to help us identify and diagnose events.
  • 53. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Catalytic’s parallelized bioinformatics workflows with Fargate C O N 3 1 2 - R Karly Sindy R&D Software Developer Catalytic Data Science
  • 54. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 55. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Magpie: A Multiplexed Automated Gene Editing Pipeline prototype to production
  • 56. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Gene editing systems: site-specific GTGCACCTGACTCCTGTGGAGAAGTCTGCCGTTACT GTGCACCTGACTCCTGAGGAGAAGTCTGCCGTTACT mutation …TCCTGAGGAGA… repaired …TCCTGTGGAGA… not repaired collect —> NGS
  • 57. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Magpie - analysis of gene editing systems CACCTGACTCCTGAGGAGAAGTCTGCCGTTACT GTGCACCTGACTCCTGAGGAGAAGTCTGCCGTTA GTGCACCTGACTCCTGAGGAGAAGTCTGCC ACTCCTGTGGAGAAGTCTGCCGTTACT GTGCACCTGACTCCTGAGGAGAAGTCTGC ACCTGACTCCTGTGGAGAAGTCTGCCGTTA GTGCACCTGACTCCTGTGGAGAAGTCTGCCGTTACT
  • 58. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Customer request Faster!
  • 59. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Prototype: parallel runs
  • 60. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Fargate Benefits Parallel runs means parallel results. Better for sporatic application load: financially and in developer time.
  • 61. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Lessons learned Available CLIs Plan for limited task size and quota. Reduce docker image size for quicker startup. Create cleanup cron for runaway tasks.
  • 62. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Task definition: ecs-cli compose task_definition: ecs_network_mode: awsvpc task_role_arn: $ecsTaskRoleArn task_execution_role: $ecsTaskExecutionRole task_size: cpu_limit: 4096 mem_limit: 8GB services: magpie: essential: true run_params: network_configuration: awsvpc_configuration: subnets: ecs-params.yml snippet version: ‘2’ services: magpie: image: <xxx.ecr.us-east- 1.amazon.com/magpie> ports: - "8000:8000" logging: driver: awslogs options: awslogs-group: magpie-log awslogs-region: us-east-1 awslogs-stream-prefix: ecs docker-compose.yml snippet
  • 63. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Run task: lambda client.run_task( cluster=ecs_cluster_name, taskDefinition=task_definition_arn, overrides=params, launchType='FARGATE', networkConfiguration={ 'awsvpcConfiguration': { 'subnets': [ ecs_task_vpc_subnet_1, ecs_task_vpc_subnet_2 ], } } ) lambda function snippet Cluster : demo-tasks magpie:248772e-j879-4… demo-tasks magpie:24 family:magpie x.x.x.x x.x.x.x x:x:x:x:x:x magpie xxx.ecr.us-east-1.am... demo-magpie-log amplicon magpie
  • 64. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Requirements for production Fault Tolerance Retry when hit task limit or other infra error. Recall Past Processes Dynamically workflow applications together. Visibility Visually track errors and progress with asynchronous workflows.
  • 65. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Production: Amazon Dynamo, AWS Step Functions, and AWS Fargate
  • 66. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Incorporating complex workflows
  • 67. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Visibility Monitoring Amazon DynamoDB, AWS Step Function, Amazon ECS $ aws dynamodb scan --table-name analytic-cdsqab-run --filter-expression "(contains(runStatus,:runStatus))" --expression-attribute-values '{":runStatus":{"S":"ERROR"}}' --projection-expression "batchId" demo-tasks > demo > Cluster : demo
  • 68. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Visibility Debug Amazon DynamoDB, AWS Step Functions Monitoring Amazon DynamoDB, AWS Step Function, Amazon ECS
  • 69. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Visibility Logs Amazon CloudWatch Debug Amazon DynamoDB, AWS Step Functions Monitoring Amazon DynamoDB, AWS Step Function, Amazon ECS
  • 70. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Wish List Fire and forget In the spirit of serverless, automatically infrastructure errors in AWS Fargate, AWS Lambdas, Amazon ECS, DBs. Mount volume Amazon EFS, NFS, Amazon EBS Task-level metrics Amazon ECS console
  • 71. Thank you! © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Uttara Sridhar uttara@amazon.com Karly Sindy Karly.Sindy@CatalyticDS.com
  • 72. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.