exam questions

Exam AWS Certified Solutions Architect - Associate SAA-C02 All Questions

View all questions & answers for the AWS Certified Solutions Architect - Associate SAA-C02 exam

Exam AWS Certified Solutions Architect - Associate SAA-C02 topic 1 question 280 discussion

A solutions architect is designing the cloud architecture for a company that needs to host hundreds of machine learning models for its users. During startup, the models need to load up to 10 GB of data from Amazon S3 into memory, but they do not need disk access. Most of the models are used sporadically, but the users expect all of them to be highly available and accessible with low latency.
Which solution meets the requirements and is MOST cost-effective?

  • A. Deploy models as AWS Lambda functions behind an Amazon API Gateway for each model.
  • B. Deploy models as Amazon Elastic Container Service (Amazon ECS) services behind an Application Load Balancer for each model.
  • C. Deploy models as AWS Lambda functions behind a single Amazon API Gateway with path-based routing where one path corresponds to each model.
  • D. Deploy models as Amazon Elastic Container Service (Amazon ECS) services behind a single Application Load Balancer with path-based routing where one path corresponds to each model.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
viet1991
Highly Voted 3 years, 8 months ago
C. AWS just update Lambda to support 10G memory and helping compute intensive applications like machine learning... No disk access, lowest cost Posted On: Dec 1, 2020 https://aws.amazon.com/about-aws/whats-new/2020/12/aws-lambda-supports-10gb-memory-6-vcpu-cores-lambda-functions/#:~:text=Customer%20Enablement-,AWS%20Lambda%20now%20supports%20up%20to%2010%20GB%20of%20memory,vCPU%20cores%20for%20Lambda%20Functions&text=AWS%20Lambda%20customers%20can%20now,previous%20limit%20of%203%2C008%20MB. P/s: ELB has limit of 100 target groups
upvoted 46 times
crazyaboutazure
3 years, 7 months ago
C is right as If you want to run very small actions that are relatively simple in complexity, AWS Lambda provides a compelling hands-off solution to a highly scalable application. If your application or services do not fit within the limits that Lambda enforces, then Amazon ECS may provide better options for you. If ECS with Fargate was given then that would have been best option. The situation demands for high availability and low latency which Lambda gives for 10 GB as it has 7.6 faster and ince Lambda charges are proportional to memory configured and function duration (GB-seconds), the additional costs for using more memory may be offset by lower duration.
upvoted 4 times
...
cnmc
3 years, 7 months ago
It seems you've never actually trained a model before... We CAN use Lambda to train models, but we SHOULD NOT. It's going to be hugely expensive, and 15mins is certainly too short
upvoted 2 times
andwill1001
3 years, 7 months ago
Have you? A simple google search shows that Lambda is highly recommended for machine learning models. Curious why you think we "should not"
upvoted 4 times
andwill1001
3 years, 7 months ago
answer is C. This article is literally the exact architecture C is talking about: https://towardsdatascience.com/building-a-serverless-containerized-machine-learning-model-api-using-aws-lambda-api-gateway-and-a73a091ff82e
upvoted 1 times
andwill1001
3 years, 7 months ago
changing my answer to D based on pricing.
upvoted 1 times
...
...
...
...
...
DrCloud
Highly Voted 3 years, 8 months ago
D To meet the requirements (such as "Most of the models are used sporadically") and to be "MOST cost-effective
upvoted 18 times
robertomartinez
3 years, 8 months ago
Yes long running (ML training) 10gig lambda is gonna be VERY expensive , and could be impossible (15 min max) + as a tip 10 GIG was not possible when question was written. Please compare cost before saying ECS is more expensive than lambda: it makes no sense to say that for such compute intensive task, ECS is also pay as you go with much lower price/second with same capacity as lambda
upvoted 3 times
robertomartinez
3 years, 8 months ago
Some proof with us east ohio pricing data: 10G lambda 0.0000001667*1000*3600 = 0.60/hour with 6 vCPU ECS 10G (fargate) : $0.004445*10 (10G mem) +0.04048*4 = 0.161= 0.20/h : ECS fargate is 3 times cheaper than lambda, if you use ECS fargate spot, it's gonna be at least 9 times cheaper than lambda. The only thing is you gotta pay for ALB with D. In the end it's another question with incomplete input parameters so the real answer should be : not enough data to decide between lambda and ECS, but I guess at the time of the question there was no 10G lambda , and lambda makes no sense for ML training (15 min max lambda duration limit)
upvoted 2 times
...
...
kullstone
3 years, 7 months ago
If anyone chooses ans is D (with a single ALB), please read these quotas below. It's about ALB. https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html
upvoted 1 times
...
TAvenger
3 years, 8 months ago
"C" is the answer. D can NOT be the RIGHT answer. Don't forget - we need highly available. ECS is higly scalable but not cheap. It uses EC2 instances under the hood. In order to be highly available you will have a few EC2 instances always running to support at least one container for each machine learning model. And each of this containers will consume 10Gb per model even if it is idling. In total it will be more than 1 TB memory ALL THE TIME. And traffic is sporadic. This means that sometimes you will not have any requests, but your containers (at least 1 per model) will be running wasting requested memory. If you configure somehow (don't know even if it is possible) to have 0 containers when idling -> you will not have highly availabe system because you will need to run the container and provision the underlying EC2 instances.
upvoted 5 times
lehoang15tuoi
3 years, 7 months ago
This proves you need to study ECS again: "ECS is higly scalable but not cheap. It uses EC2 instances under the hood. In order to be highly available you will have a few EC2 instances always running to support at least one container for each machine learning model."
upvoted 2 times
...
robertomartinez
3 years, 7 months ago
wrong ECS is cheaper than lambda + ECS can use fargate where you pay 0 when not used
upvoted 2 times
...
...
...
BECAUSE
Most Recent 1 year, 12 months ago
Selected Answer: A
A is the answer
upvoted 1 times
BECAUSE
1 year, 11 months ago
Sorry for the confusion. The answer is D!
upvoted 1 times
...
...
Sachin032
2 years, 2 months ago
Selected Answer: D
Not sure why the answer is C, Labda is just 15min and we are not sure how much time takes for model. I will go for D option
upvoted 1 times
...
hollie
2 years, 6 months ago
Selected Answer: D
Path based routing is for ALB, not API gateway. https://aws.amazon.com/blogs/containers/using-aws-application-load-balancer-path-based-routing-to-combine-amazon-ecs-launch-types/
upvoted 1 times
...
hello2022
2 years, 9 months ago
Anyone who passed the exam, let us know what they chose?
upvoted 2 times
...
Moathov
2 years, 9 months ago
Selected Answer: D
Answer is D as ECS is cheaper than Lambda
upvoted 1 times
...
chrismerchan
2 years, 11 months ago
C https://aws.amazon.com/es/about-aws/whats-new/2020/12/aws-lambda-supports-10gb-memory-6-vcpu-cores-lambda-functions/
upvoted 2 times
...
zehnminuten
3 years, 2 months ago
I thought D at first. But C for the win. Anyone noticed the key words "... the majority of models are used seldom ..." - Lambda saves costs here compared to running EC2 instances.
upvoted 1 times
...
Robert_B
3 years, 3 months ago
Selected Answer: C
C - correct (better fit to the entire demand than A); it also tackles no disk requirements, scalability & latency. B or D can not be right as for ECS you need EC2 instances (and allocated disk storage) and it really does not even mention Fargate in order to make sense. Also each EC2 instances take load time and cost allocated resources more than the variable requirements mentioned in the demand. (PS: Do not forget that API GW also has a free tier of 1M runs/month for first 12m)
upvoted 1 times
...
envest
3 years, 4 months ago
IMO: C has lower cost with pas as you go: https://aws.amazon.com/blogs/compute/pay-as-you-go-machine-learning-inference-with-aws-lambda/; ECS has underlying instance costs: https://aws.amazon.com/blogs/containers/using-aws-application-load-balancer-path-based-routing-to-combine-amazon-ecs-launch-types/
upvoted 1 times
maslanka
2 years, 9 months ago
in the first link it litteraly says that Lambda+S3 in this scenario can be costly and to use EFS, so how C?
upvoted 1 times
...
...
FF11
3 years, 4 months ago
Selected Answer: D
D seems correct because ALB supports path based routing. API gateway creates stages for method request, integration request, method response, integration response. API gateway enables caching and set throttling limits.
upvoted 1 times
...
muhsin
3 years, 5 months ago
definitely not C. Because every time Lambda function runs it needs to retrieve the model from S3 which causes delay. Lambda is just a runtime env you can not save anything before running it or after it is run.
upvoted 2 times
...
banjojoe
3 years, 6 months ago
another anoying question, who writes these things? all answers seem to meet the requirements so the focus is on "MOST cost-effective" (a) and (c) are the same with the exception of (a) using more API Gateways and so being more expensive. so it can't be (a) (b) and (d) are also the same with the exception of (b) using more ALBs and so being more expensive, so it can't be (b) between (c) and (d) is a tough one, lambda vs ecs. 0GB of data into RAM and doesn't need disk access suggests (c) but robertomartinez comment below calculates ECS is cheaper than lambda for similar compute power, so (d) but (d) uses a single ALB and they are limited to 100 target group instances and the question says "hosts hundreds of machine learning models" so (c) but "hundreds of machine learning models" doesn't specify if they are all different learning models or not (you could have 200 learning models run but they are only of 5 types, so you'd only want 5 target groups), so (d) and for (c) can you do serious machine learning if a lambda function can only run for 15 minutes at a time? to conclude, i have no idea
upvoted 6 times
Edgarrt
3 years, 5 months ago
i think u pay per request to gw not for each gw
upvoted 1 times
...
rav009
3 years, 6 months ago
I think "hundreds of machine learning models" does mean different types of model. So D is not right.
upvoted 1 times
...
...
jay_c_an
3 years, 7 months ago
Not an expert but Lambda needs to load 10G worth of data and max run time for Lambda is 15min. Doesn't sound right. Maybe D.
upvoted 1 times
chrismerchan
2 years, 11 months ago
Lamba support 10 GB in memory https://aws.amazon.com/es/about-aws/whats-new/2020/12/aws-lambda-supports-10gb-memory-6-vcpu-cores-lambda-functions/
upvoted 1 times
...
...
ecastilla
3 years, 7 months ago
In my opinion answer is D, based on what follows. Solution is between C and D. Question says "during startup each model requires to load 10GB of data from S3 into memory". Can you do that with lambda functions (C) ?. I think no. You would require each called function read 10GB from S3 before processing the request. Using containers this is possible, that's why I go with D. (please clarifications about if lambda functions can do that or not are wellcome)
upvoted 1 times
chrismerchan
2 years, 11 months ago
Lambda supports 10 GB in memory https://aws.amazon.com/es/about-aws/whats-new/2020/12/aws-lambda-supports-10gb-memory-6-vcpu-cores-lambda-functions/
upvoted 1 times
...
...
Monbots
3 years, 7 months ago
check this link. It says that AWS have a way to reduce cost using lambda for machine learning models with sporadic inference requests throughout the day. https://aws.amazon.com/blogs/compute/pay-as-you-go-machine-learning-inference-with-aws-lambda/ Ans C
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...