DVA-C02 · Question #407
A company runs a critical application on Amazon Elastic Container Service (Amazon ECS) by using Amazon EC2 instances. The company needs to migrate the application to Amazon ECS on AWS Fargate. A…
The correct answer is A. Use the PutClusterCapacityProviders API operation to associate the ECS cluster with the. Migrating an ECS cluster from EC2 to Fargate with least downtime requires using PutClusterCapacityProviders to add the FARGATE and FARGATE_SPOT managed providers to the existing cluster.
Question
A company runs a critical application on Amazon Elastic Container Service (Amazon ECS) by using Amazon EC2 instances. The company needs to migrate the application to Amazon ECS on AWS Fargate. A developer is configuring Fargate and the ECS capacity providers to make the change. Which solution will meet these requirements with the LEAST downtime during migration?
Options
- AUse the PutClusterCapacityProviders API operation to associate the ECS cluster with the
- BUse the CreateCapacityProvider API operation to associate the ECS cluster with the FARGATE
- CUse the PutClusterCapacityProviders API operation to associate the ECS cluster with the
- DUse the CreateCapacityProvider API operation to associate the ECS cluster with the FARGATE
How the community answered
(56 responses)- A59% (33)
- B11% (6)
- C23% (13)
- D7% (4)
Why each option
Migrating an ECS cluster from EC2 to Fargate with least downtime requires using PutClusterCapacityProviders to add the FARGATE and FARGATE_SPOT managed providers to the existing cluster.
PutClusterCapacityProviders updates the capacity providers associated with an existing ECS cluster without recreating it, allowing both EC2 and Fargate tasks to run simultaneously during the transition. FARGATE and FARGATE_SPOT are AWS-managed capacity providers that already exist and do not need to be created, making this the least-downtime approach.
CreateCapacityProvider is used to register custom Auto Scaling Group-backed capacity providers; FARGATE and FARGATE_SPOT are pre-existing AWS-managed providers that cannot and do not need to be created.
Using PutClusterCapacityProviders with only FARGATE_SPOT (without FARGATE) limits availability to spot instances, which can be interrupted, increasing the risk of downtime during migration.
CreateCapacityProvider cannot create the FARGATE_SPOT managed provider, and using only spot capacity introduces interruption risk that increases potential downtime.
Concept tested: ECS capacity provider migration from EC2 to Fargate
Source: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-capacity-providers.html
Community Discussion
No community discussion yet for this question.