Questions 25 to 27

Explanations for questions 25 to 27

We'll cover the following

Question 25

An application on Amazon Elastic Container Service (ECS) performs data processing in two parts. The second part takes much longer to complete. How can an architect decouple the data processing from the back-end application component?

  1. Process both parts using the same ECS task. Create an Amazon Kinesis Firehose stream.
  2. Process each part using a separate ECS task. Create an Amazon SNS topic, and send a notification when the processing completes.
  3. Create an Amazon DynamoDB table, and save the output of the first part to the table.
  4. Process each part using a separate ECS task. Create an Amazon SQS queue.

Correct Answer: 4

Explanation: Processing each part using a separate ECS task may not be essential, but it means you can separate the processing of the data. An Amazon Simple Queue Service (SQS) is used for decoupling applications. It is a message queue on which you place messages for processing by application components. In this case, you can process each data processing part in separate ECS tasks and have them write an Amazon SQS queue. That way, the back-end can pick up messages from the queue when they’re ready, and there will be no delay due to the second part not being complete.

INCORRECT: “Process both parts using the same ECS task. Create an Amazon Kinesis Firehose stream.” is incorrect. Amazon Kinesis Firehose is used for streaming data. This is not an example of streaming data. In this case, SQS is better because a message can be placed on a queue to indicate that the job is complete and ready to be picked up by the back-end application component.

INCORRECT: “Process each part using a separate ECS task. Create an Amazon SNS topic, and send a notification when the processing completes.” is incorrect. Amazon Simple Notification Service (SNS) can be used for sending notifications. It is useful when you need to notify multiple AWS services. In this case, an Amazon SQS queue is a better solution as there is no mention of multiple AWS services, and this is an ideal use case for SQS.

INCORRECT: “Create an Amazon DynamoDB table, and save the output of the first part to the table.” is incorrect. Amazon DynamoDB is unlikely to be a good solution for this requirement. There is a limit on the maximum amount of data that you can store in an entry in a DynamoDB table.

CORRECT: “Process each part using a separate ECS task. Create an Amazon SQS queue.” is the correct answer.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.