SAA-C03 · Question #446
SAA-C03 Question #446: Real Exam Question with Answer & Explanation
The correct answer is C: Migrate the script on the EC2 instance to an AWS Lambda function with an event source of the. AWS advises using serverless event-driven processing to minimize operational burden and scale automatically with demand. Amazon SQS can be directly configured as an event source for AWS Lambda. With this setup, Lambda polls the queue, invokes the function, and processes messages
Question
A company uses an Amazon EC2 instance to run a script to poll for and process messages in an Amazon Simple Queue Service (Amazon SQS) queue. The company wants to reduce operational overhead while maintaining its ability to process an increasing number of messages that are added to the queue. Which solution will meet these requirements?
Options
- AIncrease the size of the EC2 instance to process messages in the SQS queue faster.
- BConfigure an Amazon EventBridge rule to turn off the EC2 instance when the SQS queue is
- CMigrate the script on the EC2 instance to an AWS Lambda function with an event source of the
- DConfigure an AWS Systems Manager Run Command to run the script on demand.
Explanation
AWS advises using serverless event-driven processing to minimize operational burden and scale automatically with demand. Amazon SQS can be directly configured as an event source for AWS Lambda. With this setup, Lambda polls the queue, invokes the function, and processes messages without requiring the customer to manage infrastructure. Scaling is automatic, based on the volume of messages in the queue. Option A (increasing instance size) still leaves scaling and management challenges. Option B reduces cost when idle but does not address scaling. Option D requires manual triggering and does not meet continuous processing requirements. Migrating the script to Lambda (C) fully eliminates the need for instance management, providing scalability, reliability, and reduced operational overhead.
Community Discussion
No community discussion yet for this question.