A company is building a new machine learning solution on AWS. Models are implemented as independent microservices that download about 1 GB of model data from Amazon S3 at startup and load it into memory. Users access models via an asynchronous API: they submit a request or a batch of requests and specify where results should be sent. Hundreds of users will use the models with irregular usage patterns—some models may be idle for days or weeks, while others receive bursts of thousands of requests. Which design should a solutions architect recommend to meet these requirements?
Choose an answer
Tap an option to check your answer.
Correct answer: Direct the requests from the API into an Amazon Simple Queue Service (Amazon SQS) queue. Deploy the models as Amazon Elastic Container Service (Amazon ECS) services that read from the queue. Enable AWS Auto Scaling on Amazon ECS for both the cluster and copies of the service based on the queue size..
Why this is the answer
The correct solution uses Amazon SQS for asynchronous processing, which is ideal for irregular usage patterns and allows models to process requests at their own pace. Deploying models as Amazon ECS services is suitable because the 1 GB model data size exceeds Lambda's ephemeral storage limits and cold start times would be significant for large models. ECS allows models to be pre-loaded into memory. AWS Auto Scaling based on SQS queue size ensures that ECS scales out instances and service tasks only when needed, optimizing costs for models that may be idle for long periods and handling bursts efficiently. Incorrect options: Lambda functions invoked by an NLB or SQS are not suitable due to the 1 GB model data size and potential cold start issues. Lambda has limitations on deployment package size and memory, making it difficult to load large models efficiently. An ALB directing to ECS services that read from SQS is less efficient than directly putting requests into SQS, as the ALB adds an unnecessary layer for an asynchronous workflow. AWS App Mesh is for service-to-service communication and traffic routing, not for scaling ECS based on SQS queue size.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed