Common use cases in Amazon ECS
Fargate is suitable for the following workloads:
-
Large workloads that need to be optimized for low overhead
-
Small workloads that have occasional burst
-
Tiny workloads
-
Batch workloads
EC2 is suitable for the following workloads:
-
Workloads that require consistently high CPU core and memory usage
-
Large workloads that need to be optimized for price
-
Your applications need to access persistent storage
-
You must directly manage your infrastructure
Additional resources
You can use Amazon ECS to create a consistent build and deployment experience, to
manage and scale batch and Extract-Transform-Load (ETL) workloads, and to build
sophisticated application architectures on a microservices model. For more
information about Amazon ECS use cases and scenarios, see Container Use Cases
You can view the microservices reference architecture on GitHub. For more
information, see Deploying Microservices with Amazon ECS, Amazon CloudFormation, and an Application Load Balancer
The following resources outline how to implement continuous integration and deployment (CI/CD):
-
ECS Reference Architecture: Continuous Deployment
: This reference architecture demonstrates how to achieve continuous deployment of an application to Amazon ECS using CodePipeline, CodeBuild, and Amazon CloudFormation. -
Continuous Delivery Pipeline for Amazon ECS Using Jenkins, GitHub, and Amazon ECR
: This Amazon labs repository helps you set up and configure a continuous delivery pipeline for Amazon ECS using Jenkins, GitHub, and Amazon ECR.
The Managing Secrets for Amazon ECS Applications Using Parameter Store and IAM Roles for
Tasks
The following resources outline how to make your services discoverable:
-
Amazon ECS Service Connect Enabling Easy Communication Between Microservices
: This post describes how to use the dynamic port mapping and path-based routing features of Elastic Load Balancing Application Load Balancers. This provides service discovery for a microservice architecture. -
Amazon Elastic Container Service - Reference Architecture: Service Discovery
: This Amazon ECS reference architecture provides service discovery to containers using CloudWatch Events, Lambda, and Route 53 private hosted zones. -
Metrics and traces collection from Amazon ECS using Amazon Distro for OpenTelemetry with dynamic service discovery
: This post demonstrates how to employ a single instance of an ADOT Collector to collect X-Ray traces and Prometheus metrics from Amazon ECS services that were dynamically discovered using Amazon Cloud Map.