Which compute service should the solutions architect have the API invoke to deliver the requirements at the lowest cost?
An AWS Glue job
An AWS Lambda function
A containerized service hosted in Amazon Elastic Kubernetes Service (Amazon EKS)
A containerized service hosted in Amazon ECS with Amazon EC2
Explanations:
AWS Glue is primarily used for ETL (Extract, Transform, Load) processes and is not ideal for low-latency, asynchronous processing. It has longer startup times and is not designed for handling variable request patterns efficiently.
AWS Lambda is a serverless compute service that can handle variable request volumes efficiently. It scales automatically with incoming requests and is cost-effective since you only pay for the compute time used. It can process requests asynchronously and complete within a few seconds, aligning perfectly with the requirements.
Amazon EKS is suited for running containerized applications but requires managing the underlying Kubernetes infrastructure. This adds complexity and cost, especially for variable workloads with periods of inactivity, making it less optimal compared to serverless solutions like Lambda.
While Amazon ECS with EC2 can run containerized applications, it involves managing EC2 instances, which incurs costs even during idle periods. This does not align with the requirement for low-cost and highly variable request handling compared to a serverless option like AWS Lambda.