AWS Certified Developer – Associate (DVA-C02) — Question 358
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?
Answer options
- A. Use the PutClusterCapacityProviders API operation to associate the ECS cluster with the FARGATE and FARGATE_SPOT capacity provider strategies. Use FARGATE as Provider 1 with a base value. Use FARGATE_SPOT as Provider 2 for failover.
- B. Use the CreateCapacityProvider API operation to associate the ECS cluster with the FARGATE and FARGATE_SPOT capacity provider strategies. Use FARGATE as Provider 1 with a base value. Use FARGATE_SPOT as Provider 2 for failover.
- C. Use the PutClusterCapacityProviders API operation to associate the ECS cluster with the FARGATE and FARGATE_SPOT capacity provider strategies. Use FARGATE_SPOT as Provider 1 with a base value. Use FARGATE as Provider 2 for failover.
- D. Use the CreateCapacityProvider API operation to associate the ECS cluster with the FARGATE and FARGATE_SPOT capacity provider strategies. Use FARGATE_SPOT as Provider 1 with a base value. Use FARGATE as Provider 2 for failover.
Correct answer: A
Explanation
The PutClusterCapacityProviders API operation is used to associate capacity providers with an existing ECS cluster, as FARGATE and FARGATE_SPOT are already created by AWS and do not need to be created via CreateCapacityProvider. Since the application is critical, FARGATE should be set as the primary provider with a base value to ensure reliable capacity, while FARGATE_SPOT is used as the secondary provider to handle additional load.