When choosing between Lambda and EC2/Fargate for a stateless worker with bursty workloads, what is a key consideration?

Sharpen your skills for the AWS Certified Solutions Architect Professional Exam. Dive into flashcards, multiple choice questions, each with detailed explanations and hints. Perfect your knowledge and get ready to ace the AWS exam!

Multiple Choice

When choosing between Lambda and EC2/Fargate for a stateless worker with bursty workloads, what is a key consideration?

Explanation:
For bursty, stateless workloads, the standout factor is how a solution handles scaling and cost as demand changes. Lambda automatically scales out with incoming requests, so you don’t have to provision or guess capacity to handle spikes. You only pay for the actual compute time and the number of invocations, which often makes it cheaper for sporadic loads because you’re not paying for idle resources. This fits well with stateless workers, since any needed state can be kept externally (in services like S3 or DynamoDB) and each invocation can run independently. Keep in mind Lambda has constraints to respect: a maximum execution time per invocation, possible cold starts, and regional concurrency limits. If the workload involves very long-running tasks, very large memory needs, or requires persistent warm capacity, EC2 or Fargate might be more suitable. So the key consideration is automatic scaling and cost efficiency for sporadic loads.

For bursty, stateless workloads, the standout factor is how a solution handles scaling and cost as demand changes. Lambda automatically scales out with incoming requests, so you don’t have to provision or guess capacity to handle spikes. You only pay for the actual compute time and the number of invocations, which often makes it cheaper for sporadic loads because you’re not paying for idle resources. This fits well with stateless workers, since any needed state can be kept externally (in services like S3 or DynamoDB) and each invocation can run independently.

Keep in mind Lambda has constraints to respect: a maximum execution time per invocation, possible cold starts, and regional concurrency limits. If the workload involves very long-running tasks, very large memory needs, or requires persistent warm capacity, EC2 or Fargate might be more suitable.

So the key consideration is automatic scaling and cost efficiency for sporadic loads.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy