Answer: B
Option A is incorrect. Although spot instances offer very low compute prices, they are most useful in situations where you have flexible start & end times for your applications. Since time criticality is an important aspect for application execution, spot instances may not be the best fit here which can be terminated within a short notice period.
Option B is CORRECT.With AWS lambda, code gets executed only when needed & AWS automatically takes care of dynamically provisioning / de-provisioning compute capacity to execute the Lambda function. Also known as serverless computing technology, users pay only for the duration of the lambda function execution & they do not need to provision or manage servers. This is the best possible way to dramatically reduce costs without managing idle time of unused compute capacity.
Option C is incorrect. Although Standard Reserved Instances provide up to 75% off on-demand price, they are more useful for steady-state or predictable applications. Since our scenario only talks about limited usage, RI may not be a good choice.
Option D is incorrect. On-demand EC2 instances need to be provisioned & managed by the user. You also need to account for idle compute time & terminate instances that are idle which otherwise will have cost implications.
Diagram:
Depicts a serverless architecture using API Gateway, Lambda, Dynamo DB streams for an Employee Attendance system
References:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances.html
https://aws.amazon.com/lambda/
https://d1.awsstatic.com/whitepapers/serverless-architectures-with-aws-lambda.pdf
https://aws.amazon.com/ecs/?whats-new-cards.sort-by=item.additionalFields.postDateTime&whats-new-cards.sort-order=desc&ecs-blogs.sort-by=item.additionalFields.createdDate&ecs-blogs.sort-order=desc