Exam SAP-C02 All QuestionsBrowse all questions from this exam
Question 510

A company hosts a data-processing application on Amazon EC2 instances. The application polls an Amazon Elastic File System (Amazon EFS) file system for newly uploaded files. When a new file is detected, the application extracts data from the file and runs logic to select a Docker container image to process the file. The application starts the appropriate container image and passes the file location as a parameter.

The data processing that the container performs can take up to 2 hours. When the processing is complete, the code that runs inside the container writes the file back to Amazon EFS and exits.

The company needs to refactor the application to eliminate the EC2 instances that are running the containers.

Which solution will meet these requirements?

    Correct Answer: C

    To meet the requirements of eliminating EC2 instances and effectively handling long-running data processing tasks, creating an Amazon Elastic Container Service (ECS) cluster and configuring processing to run as AWS Fargate tasks is appropriate. Migrating the storage of file uploads to Amazon S3 allows you to leverage S3 event notifications, which can invoke an AWS Lambda function for the container selection logic. The Lambda function can then start the appropriate Fargate task. This approach enables automatic triggering upon file upload and ensures that the storage system supports event notifications.

Discussion
kupo777

C EFS cannot notify events and Lambda cannot do container execution for 2 hours.

mark_232323Option: C

EFS event notification to invoke the Fargate --> EFS don't have event notification like s3

vip2Option: C

C EventBridge can not monitor EFS event directly, not A