Q53 — AWS SAA-C03 Ch.15
Question 53 of 100 | ← Chapter 15
Q1153. An insurance company wants to migrate an application that calculates insurance premiums to AWS. The company needs to run calculations immediately when a customer submits information through the application. The application usually takes 10 seconds to process a calculation.A solutions architect needs to develop an architecture on AWS to handle the application.Which solution will meet this requirement?
- A. Set up an Amazon API Gateway HTTP API to receive the data. Use an AWS Lambda function to process the data immediately. ✓
- B. Upload the customer data to an Amazon S3 bucket. Start an Amazon EC2 Spot Instance to process every data upload.
- C. Set up AWS Transfer Family to receive the customer data. Configure an Amazon Elastic Kubernetes Service(Amazon EKS) job to process the customer data on a schedule.
- D. Upload the data to an Amazon S3 bucket. Invoke an AWS Batch job to process every customer data upload.
Correct Answer: A. Set up an Amazon API Gateway HTTP API to receive the data. Use an AWS Lambda function to process the data immediately.
Explanation
To meet the requirement of running insurance premium calculations immediately when a customer submits information (with a processing time of ~10 seconds), let's evaluate the options:Key Requirements:Immediate processing of customer submissions (low latency). 10-second processing time (suggests a serverless or short-lived compute solution is suitable).Scalable and cost-effective for variable workload.Option Analysis:A. Set up an Amazon API Gateway HTTP API to receive the data. Use an AWS Lambda function to process the data immediately.API Gateway can receive HTTP requests from the application. AWS Lambda is serverless, scales instantly, and is ideal for short-lived tasks (like a 10-second calculation).It is cost-effective for variable workloads.This is the best fit for immediate, on-demand processing.B. Upload the customer data to an Amazon S3 bucket. Start an Amazon EC2 Spot Instance to process every data upload.S3 upload introduces latency (data must first be written to S3 before processing starts). EC2 Spot Instances are not ideal for immediate processing (they are spot-priced and may take time to start, and are better for batch jobs).This is not suitable for immediate, low-latency processing. C. Set up AWS Transfer Family to receive the customer data. Configure an Amazon Elastic Kubernetes Service (Amazon EKS) job to process the customer data on a schedule. AWS Transfer Family is for file transfers (SFTP, FTPS, etc.), not HTTP API requests. EKS jobs on a schedule are not immediate (they run at scheduled times, not on-demand).This is not suitable for real-time processing.D. Upload the data to an Amazon S3 bucket. Invoke an AWS Batch job to process every customer data upload.S3 upload introduces latency (data must first be written to S3 before processing starts). AWS Batch is better for batch processing (not immediate, on-demand processing). It also requires managing compute environments, which adds overhead.This is not suitable for immediate, low-latency processing.Correct Answer:A. Set up an Amazon API Gateway HTTP API to receive the data. Use an AWS Lambda function to process the data immediately.This solution provides immediate processing with low latency (no S3 upload delay) and is scalable and cost-effective for variable workloads. AWS Lambda is the best fit for this use case.