New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Amazon SAP-C02 Exam - Topic 1 Question 60 Discussion

Actual exam question for Amazon's SAP-C02 exam
Question #: 60
Topic #: 1
[All SAP-C02 Questions]

A video processing company has an application that downloads images from an Amazon S3 bucket, processes the images, stores a transformed image in a second S3 bucket, and updates metadata about the image in an Amazon DynamoDB table. The application is written in Node.js and runs by using an AWS Lambda function. The Lambda function is invoked when a new image is uploaded to Amazon S3.

The application ran without incident for a while. However, the size of the images has grown significantly. The Lambda function is now failing frequently with timeout errors. The function timeout is set to its maximum value. A solutions architect needs to refactor the application's architecture to prevent invocation failures. The company does not want to manage the underlying infrastructure.

Which combination of steps should the solutions architect take to meet these requirements? (Choose two.)

Show Suggested Answer Hide Answer
Suggested Answer: A, B

A . Modify the application deployment by building a Docker image that contains the application code. Publish the image to Amazon Elastic Container Registry (Amazon ECR). - This step is necessary to package the application code in a container and make it available for running on ECS. B. Create a new Amazon Elastic Container Service (Amazon ECS) task definition with a compatibility type of AWS Fargate. Configure the task definition to use the new image in Amazon Elastic Container Registry (Amazon ECR). Adjust the Lambda function to invoke an ECS task by using the ECS taskdefinition when a new file arrives in Amazon S3.


Contribute your Thoughts:

0/2000 characters
Dannette
9 days ago
But A doesn’t solve the timeout issue directly. B is better.
upvoted 0 times
...
Tawny
14 days ago
I’m leaning towards A. Docker images can simplify deployment.
upvoted 0 times
...
Lonna
19 days ago
I agree, B seems solid. ECS with Fargate is a good choice.
upvoted 0 times
...
Devorah
24 days ago
This question is tricky! I think B could work well.
upvoted 0 times
...
Gracie
30 days ago
Not sure if Step Functions will really help with the timeout issue.
upvoted 0 times
...
Lashon
1 month ago
Totally agree, Fargate is a great choice for serverless!
upvoted 0 times
...
Alita
1 month ago
Haha, I bet the developers are wishing they had used a serverless database like DynamoDB from the start! B and C are the way to go.
upvoted 0 times
...
Suzi
2 months ago
B and C for sure. Fargate and Step Functions are the perfect combo to solve this problem without having to manage the infrastructure.
upvoted 0 times
...
Earlean
2 months ago
B and D are the way to go. Containerizing the app and using Fargate or EC2 will give you the flexibility you need, and the ECS integration with Lambda should handle the invocation.
upvoted 0 times
...
Jaclyn
2 months ago
I agree with B and C. The Fargate option seems like a good way to scale the app without having to manage the underlying infrastructure, and the Step Functions approach should help with the timeouts.
upvoted 0 times
...
Man
2 months ago
B and C seem like the best options to me. Containerizing the app and using Fargate should help with the infrastructure management, and the Step Functions with increased concurrency should handle the timeouts.
upvoted 0 times
...
Ernie
2 months ago
Okay, I think I've got a plan. I'm going to go with the ECS Fargate option (B) and the Step Functions approach (C). That way, I can scale the processing with ECS Fargate, and use Step Functions to orchestrate the workflow and handle the concurrency issues with the Lambda function. Feels like a solid solution that meets the requirements.
upvoted 0 times
...
Reena
3 months ago
Wait, why not just optimize the images instead of changing everything?
upvoted 0 times
...
Nichelle
3 months ago
Sounds like moving to ECS with Fargate is the way to go!
upvoted 0 times
...
Lucina
3 months ago
I think using EFS is a solid option too.
upvoted 0 times
...
Roxanne
3 months ago
I'm a bit torn on this one. The ECS Fargate option seems like a good solution, but I'm also intrigued by the Step Functions approach. Increasing the provisioned concurrency of the Lambda function could help, but it might not be enough on its own. I'll need to carefully consider the tradeoffs between the different options.
upvoted 0 times
...
Brice
4 months ago
Okay, I think I've got a handle on this. The main issue is that the Lambda function is timing out due to the growing image size. So we need to find a way to offload that processing to a more scalable service. I'm leaning towards the ECS Fargate option, since that seems to fit the "don't want to manage the underlying infrastructure" requirement.
upvoted 0 times
...
Lawrence
4 months ago
Hmm, this is an interesting one. I think the key is to find a way to scale the application without having to manage the underlying infrastructure. The options that involve using Fargate or ECS seem promising, since those are managed services. I'll need to weigh the pros and cons of each approach.
upvoted 0 times
...
Kassandra
4 months ago
I'm a bit confused by this question. It seems like we need to refactor the application's architecture to prevent invocation failures, but the requirements are a bit unclear to me. I'll need to read through the question carefully and think about the different options.
upvoted 0 times
Delfina
2 months ago
Yeah, the image size is a big issue. We should look at ECS options.
upvoted 0 times
...
Tamala
3 months ago
I get that the Lambda function is timing out. We need a better solution.
upvoted 0 times
...
...
Dean
4 months ago
I vaguely remember that using Docker images with ECS could help with scaling, but I’m uncertain if it’s necessary to switch from Lambda altogether.
upvoted 0 times
...
Twanna
4 months ago
I practiced a similar question where we had to refactor a Lambda function. I feel like using EFS could help with large image processing, but I’m not confident about the RDS part.
upvoted 0 times
...
Jacob
5 months ago
I think using AWS Step Functions could help manage the workflow better, but I can't recall if it would actually solve the timeout issue.
upvoted 0 times
...
Michell
5 months ago
I remember we discussed how Lambda has limitations on execution time, so moving to ECS might be a good option. I'm just not sure if Fargate is the best choice here.
upvoted 0 times
...

Save Cancel