Courseiva
Accelerate Workload Migration and ModernizationmediumMultiple ChoiceObjective-mapped

SAP-C02 Practice Question: Accelerate Workload Migration and Modernization

A company is modernizing its infrastructure by moving from EC2 instances to a serverless architecture using AWS Lambda. The application processes images uploaded to Amazon S3. The current EC2-based solution uses a third-party image processing library that is not supported in Lambda's runtime environment. What is the best approach to migrate to serverless while using the same library?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Package the library as a Lambda layer and reference it in the function.

AWS Lambda supports custom runtime environments by bundling the library with the deployment package or using Lambda layers. The library can be included as a layer, allowing the Lambda function to use it. AWS Fargate runs containers but is not serverless in the same sense; it adds overhead. Using a different library would require code changes. App Runner is for containerized applications.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Package the library as a Lambda layer and reference it in the function.

    Why this is correct

    Lambda layers allow inclusion of custom libraries, enabling use of the third-party library without code changes.

  • Use AWS Fargate to run the image processing library in a container.

    Why it's wrong here

    AWS Fargate runs containers without managing servers, but the question requires a serverless architecture using Lambda specifically, not just any serverless compute. Fargate is tempting because it can containerise the unsupported library, making it portable; it would be correct if the goal were to migrate to containers while avoiding server management, but the stem explicitly demands Lambda, which Fargate does not replace.

  • Rewrite the image processing code to use AWS Rekognition.

    Why it's wrong here

    Rekognition provides different functionality; rewriting code is not the best approach when the existing library can be used.

  • Use AWS App Runner to deploy the existing application as-is.

    Why it's wrong here

    App Runner requires containerization and is not serverless in the same way as Lambda; it adds operational overhead.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

This SAP-C02 question is part of Courseiva's 1,660-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SAP-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SAP-C02 exam.