Which solution meets these requirements?
Use the AWS Fargate launch type to create an Amazon Elastic Container Service (Amazon ECS) cluster. Create a task definition for the web application. Create an ECS service that has a desired count of three tasks.
Use the Amazon EC2 launch type to create an Amazon Elastic Container Service (Amazon ECS) cluster that has three container instances in one Availability Zone. Create a task definition for the web application. Place one task for each container instance.
Use the AWS Fargate launch type to create an Amazon Elastic Container Service (Amazon ECS) cluster that has three container instances in three different Availability Zones. Create a task definition for the web application. Create an ECS service that has a desired count of three tasks.
Use the Amazon EC2 launch type to create an Amazon Elastic Container Service (Amazon ECS) cluster that has one container instance in two different Availability Zones. Create a task definition for the web application. Place two tasks on one container instance. Place one task on the remaining container instance.
Explanations:
Using AWS Fargate, this option allows for serverless container management, ensuring that the web application runs in three instances with automatic scaling capabilities. Fargate can manage the underlying infrastructure, providing high availability and the ability to easily scale based on demand without managing EC2 instances.
This option uses the EC2 launch type with all instances in a single Availability Zone, which does not meet the requirement for high availability. If that Availability Zone experiences issues, the application would not be available.
While using Fargate is appropriate, the description mentions having three container instances, which is incorrect. Fargate abstracts away the EC2 instances, and tasks run on managed infrastructure rather than defined container instances. The requirement for three running tasks is met, but the mention of instances is misleading.
This option describes using EC2 instances in two Availability Zones but does not ensure that three tasks are running effectively. Placing two tasks on one instance can lead to a single point of failure. Moreover, if one instance fails, only one task remains operational, violating high availability requirements.