Amazon Web Services DOP-C02 Question Answer
A company is migrating an application to Amazon Elastic Container Service (Amazon ECS). The company wants to consolidate log data in Amazon CloudWatch in the us-west-2 Region. No CloudWatch log groups currently exist for Amazon ECS.
The company receives the following error code when an ECS task attempts to launch:
“service my-service-name was unable to place a task because no container instance met all of its requirements.”
The ECS task definition includes the following container log configuration:
" logConfiguration " : {
" logDriver " : " awslogs " ,
" options " : {
" awslogs-create-group " : " true " ,
" awslogs-group " : " awslogs-mytask " ,
" awslogs-region " : " us-west-2 " ,
" awslogs-stream-prefix " : " awslogs-mytask " ,
" mode " : " non-blocking " ,
" max-buffer-size " : " 25m "
}
}
The ECS cluster uses an Amazon EC2 Auto Scaling group to provide capacity for tasks. EC2 instances launch an Amazon ECS-optimized AMI.
Which solution will fix the problem?

