Skip to main content
Skip to main content
Still in beta — questions, comments or suggestions? aramb@aramb.dev

Service Selection Practice

Practice choosing between ECS, Lightsail, and CloudFormation for common AWS scenarios.

20 min
Introductory

Learning outcomes

By the end of this lesson, the learner can:

  1. Choose between ECS, Lightsail, and CloudFormation for common scenarios.
  2. Explain when Fargate, ECS Managed Instances, or ECS on EC2 is the better ECS infrastructure choice.
  3. Recognize when Lightsail is the easier bundled option for a simple app.
  4. Explain why CloudFormation is about defining and managing infrastructure, not just running an app. (AWS Documentation)

Module 4.4 review snapshot

This module covered three main ideas.

Amazon ECS is AWS's container orchestration service. Its core mental model is clusters, tasks, and services, and AWS documents multiple infrastructure choices including ECS Managed Instances, Fargate, and EC2. ECS services can also integrate with load balancing and service auto scaling. (AWS Documentation)

Amazon Lightsail is the simpler bundled AWS app platform. AWS says it includes instances, managed databases, container services, load balancers, object storage buckets, block storage, CDN distributions, DNS, and snapshots, all aimed at getting sites and web apps running quickly with predictable monthly pricing. (AWS Documentation)

AWS CloudFormation is AWS's native infrastructure as code service. AWS says you define resources in YAML or JSON templates, deploy them as stacks, and can preview updates with change sets before execution. (AWS Documentation)

A simple summary is:

  • ECS = run and scale containers
  • Lightsail = simpler bundled app platform
  • CloudFormation = define infrastructure in code and manage it as stacks (AWS Documentation)

Review map

TopicCore idea
ECSManaged way to run containerized apps
ECS taskRunning work unit based on a task definition
ECS serviceKeeps desired tasks running
FargateServerless containers
ECS Managed InstancesAWS-managed EC2-backed container capacity
ECS on EC2Containers on servers you manage
LightsailSimpler bundled AWS platform for websites and web apps
CloudFormation templateInfrastructure blueprint in YAML or JSON
CloudFormation stackDeployed unit of related resources
CloudFormation change setPreview of updates before execution

This map reflects the current ECS, Lightsail, and CloudFormation docs. (AWS Documentation)


Micro-activity: Classify the Service

Micro-Activity

Match each service to its category

Classify each AWS tool by its primary purpose.

1

Amazon ECS

2

Amazon Lightsail

3

AWS CloudFormation

4

Fargate (within ECS)

0 of 4 matched so far.


Service selection guide

Choose ECS when:

  • the workload is containerized
  • you want services, task scaling, and load balancer integration
  • you want to choose between serverless containers, AWS-managed EC2-backed containers, or EC2-backed containers you manage (AWS Documentation)

Choose Lightsail when:

  • you want to launch a simple website or web app quickly
  • you want bundled resources like server, database, storage, DNS, CDN, and snapshots in one simpler environment
  • you do not need the full flexibility of broader AWS services yet (AWS Documentation)

Choose CloudFormation when:

  • the real need is repeatable infrastructure
  • you want to define environments in code
  • you want to review updates before applying them
  • you want to recreate the same environment consistently across dev, test, or prod (AWS Documentation)

Choose Fargate inside ECS when:

  • you want serverless containers
  • you do not want to manage infrastructure
  • you want the simplest ECS entry point for container execution (AWS Documentation)

Choose ECS Managed Instances when:

  • you want ECS, but also want AWS to manage the underlying EC2 instances
  • you want a balance of operational simplicity and EC2-backed performance/cost control
  • you want the option AWS currently recommends for most ECS workloads (AWS Documentation)

Choose ECS on EC2 when:

  • you want the most control over the underlying compute
  • you are willing to manage the EC2 layer yourself
  • you want container orchestration, but not a serverless or AWS-managed-instances model (AWS Documentation)

Scenario practice

Scenario 1

You want to get a small business website online quickly with a server, database, DNS, load balancer, and simple monthly pricing.

Best fit: Lightsail AWS says Lightsail is the easiest way to get started for people building websites or web applications and includes instances, managed databases, load balancers, block storage, buckets, CDN, DNS, and snapshots. (AWS Documentation)

Scenario 2

A team has already containerized an API and wants a service that keeps the desired number of containers running and can integrate with load balancing.

Best fit: ECS service AWS says ECS services maintain the desired number of running tasks and support service auto scaling and service load balancing. (AWS Documentation)

Scenario 3

A team wants containers, but does not want to manage servers or EC2 clusters directly.

Best fit: ECS on Fargate AWS describes Fargate as serverless compute where you pay only for the task resources you use without managing infrastructure. (AWS Documentation)

Scenario 4

A team wants ECS, but also wants AWS to handle EC2 provisioning, patching, and scaling behind the scenes.

Best fit: ECS Managed Instances AWS says ECS Managed Instances fully manages the underlying EC2 instances, including provisioning, patching, scaling, and lifecycle management. (AWS Documentation)

Scenario 5

A team wants to describe an application environment in YAML, deploy it as one unit, and preview updates before applying them.

Best fit: CloudFormation AWS says CloudFormation templates use YAML or JSON, stacks are the deployed unit, and change sets preview updates before execution. (AWS Documentation)

Scenario 6

A team needs maximum control over the underlying infrastructure for its container workloads.

Best fit: ECS on EC2 AWS says ECS on EC2 gives full control over the underlying EC2 instances. (AWS Documentation)


Knowledge Check

Knowledge Check
1 / 8

Which service is the best fit for running and scaling containerized applications?


Module 4.4 wrap-up

At this point, a learner should be able to say:

  • ECS is for containerized workloads.
  • Fargate is the serverless ECS option.
  • ECS Managed Instances is the AWS-managed EC2-backed ECS option.
  • Lightsail is the simpler bundled app-platform option.
  • CloudFormation is for defining and managing infrastructure as code. (AWS Documentation)

Next lesson

Lesson 4.23: Unit 4 Mixed Service Recognition Quiz