AWS Certified Solutions Architect - Professional 2020

Sign Up Free or Log In to participate!

Fargate vs EC2 RI


You are assisting a company in the migration of their container-based web landscape over to Amazon. They have a total of 21 containers which comprise their DEV, QA and Production environments. All environment are identical in design and size. Each environment consists of 3 web servers, 3 app servers and 1 datastore server. Given the landscape, which of the provided options would be best for them to minimize maintenance?

Deploy the web and app servers in each environment using ECS. Provision an RDS instance for each environment. Use AWS Systems Manager to provide a common management console.

2) Deploy the web, app and database containers using ECS. Make use of Fargate for the underlying ECS infrastructure.

3) Deploy the web, app and database servers using ECS on EC2. Purchase 1-year reserved instance contracts for the required EC2 instances.

4) Redeploy the web landscape on a MEAN stack under Elastic Beanstalk, making use of auto-scaling groups to right-size the respective environments.


Deploying containers via ECS is a good option but we would want to use the EC2 hosted path. Fargate is generally used for transient workloads and our datastore would be something we’d want to persist. We might be able to deploy the data store with RDS, but the question does not make it clear if the data store is an RDS-supported database. It could be a NoSQL data store or some other database unsupported by RDS. Similarly, a MEAN stack under Elastic Beanstalk might not be compatible with our landscape either.

I try to understand. Reading AWS ( it mentions:

"Fargate lets you focus on designing and building your applications instead of managing the infrastructure that runs them."

This sounds like minimal maintenance. 

Compare using EC2:

Amazon ECS keeps track of all the CPU, memory and other resources in your cluster, and also finds the best server for a container to run on based on your specified resource requirements. You are responsible for provisioning, patching, and scaling clusters of servers. 

So by choosing RI is there less maintenance than Fargate?

Wrt the remark that Fargate is generally used for transient workloads and our datastore would be something we’d want to persist.

  • What is the problem if you do use Fargate in the above example? 

  • Where does it mention transient / persistence storage is a criteria?

4 Answers

The question is BeanStalk vs Containers. Question (and AWS) is leaning towards Containers. So it is EC2 vs Fargate. Fargate leads to less maintenance -> 2

1 – It’s mssing ECS on EC2 or Fargate. I guess you would infer EC2.

2 – The thought of deploying database software on containers gives me nightmares.

3 – Same as 2 for the database. Reserved instance is just noise.

4 – Would mean re-architecting

I would pick 1, but would understand if the questioner picked 2. If they did, they should serve a years penance running databases in containers and see if there’s anything low maintenance about that.

Hi Jeroen,

The main strategy for this question is one of elimination.  We need to eliminate the answers that don’t fit the landscape.  The question mentions 1 datastore server…it does not specify database, document store, etc…just that it is a persistant data store.

We eliminate 1 because we don’t know "given the landscape" as the question states, if we can run our datastore on RDS.

We eliminate 2 because Fargate is not designed for persistant data storage. Per, Fargate tasks only support non-persistant storage volumes. 

We eliminate 4 because it makes the assumption that we can use a MEAN stack–which might not be compatible with our landscape.

We’re left with 3.  Can we run persistant storage volumes with ECS on EC2?  Yes we can.  See above link.  Reserved instances is noise as Brian said.  Is there any reason we can’t use 3 as it’s the only choice we have left?  Nope.   So, we have to choose it.

This style of question and elimination is common on the exam.


I would choose between #1 and #3.

1. ECS, RDS, and Systems Manager. RDS and Systems Manager allow "to minimize maintenance."

3. ECS on EC2. This option lets you do a "lift and shift" without thinking about what kind of datastore they are using.

In a real-world scenario, I would abstain from keeping any kind of store on ECS or EC2. Mainly because AWS storage services provide so much easier scalability and backups. The question does not mention scalability and backups, but they are a part of "maintenance."

At the same time, I agree with you that we don’t know if the "datastore" is compatible with "RDS."

On the exam, I would choose #1 because of maintenance. But in real-world that really depends on whether the datastore is RDS-compatible or not.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?