A video-processing application runs as a Node.js AWS Lambda function that is triggered by S3 when a new image is uploaded. The function downloads images from one S3 bucket, transforms them, writes the transformed image to a second S3 bucket, and updates metadata in DynamoDB. As image sizes increased, the Lambda function now frequently times out; the function timeout is already set to the maximum. The company does not want to manage servers. Which combination of changes should the solutions architect implement to avoid invocation failures? (Choose two.)
Choose an answer
Tap an option to check your answer.
Correct answer: Package the application as a Docker container image and publish that image to Amazon Elastic Container Registry (Amazon ECR)., Create an Amazon ECS task definition with a compatibility of AWS Fargate that references the image in Amazon ECR. Modify the Lambda function so that when a new file arrives in S3 it starts an ECS Fargate task using that task definition..
Why this is the answer
The Lambda function is timing out due to increased image sizes, indicating it needs more processing time than the maximum 15 minutes allowed for Lambda. To address this without managing servers, moving the processing to AWS Fargate is an effective solution. Packaging the application as a Docker container image and publishing it to Amazon ECR (Elastic Container Registry) is the first step. This allows the application to be portable and run in a containerized environment like Fargate. Next, creating an Amazon ECS (Elastic Container Service) task definition with AWS Fargate compatibility, referencing the ECR image, enables serverless container execution. Modifying the Lambda function to trigger this Fargate task upon S3 upload offloads the heavy processing, leveraging Fargate's longer running times and greater resource allocation capabilities. Incorrect options: AWS Step Functions with parallel Lambda execution and increased provisioned concurrency would still be bound by Lambda's 15-minute timeout. Amazon ECS with EC2 compatibility would require managing EC2 instances, which the company wants to avoid. Storing images on Amazon EFS and metadata in Amazon RDS, while potentially improving storage and database performance, does not resolve the core issue of the Lambda function's processing time limit.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed