Courseiva
Accelerate Workload Migration and ModernizationmediumMultiple ChoiceObjective-mapped

SAP-C02 Practice Question: Accelerate Workload Migration and Modernization

A company is migrating a stateful web application to AWS. The application uses local storage for user sessions. Which AWS service can help make the application stateless and scalable?

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

Amazon ElastiCache

Amazon ElastiCache provides a managed in-memory cache that can store session data externally, allowing the web application to be stateless and scale horizontally. Amazon EBS volumes are attached to a single EC2 instance and cannot be shared across instances, so they do not help with statelessness. Amazon RDS is for relational databases and is not optimized for low-latency session state. Amazon S3 is an object store with higher latency and is not suitable for frequent session reads/writes.

Answer analysis

Option-by-option breakdown

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

  • Amazon EBS

    Why it's wrong here

    Amazon EBS is block-level storage attached to a single EC2 instance, not shared, so it does not enable statelessness.

  • Amazon ElastiCache

    Why this is correct

    Amazon ElastiCache provides an in-memory cache (like Redis or Memcached) that can be shared across instances for session data, making the application stateless.

  • Amazon RDS

    Why it's wrong here

    Amazon RDS is for relational databases, not ideal for high-speed session state.

  • Amazon S3

    Why it's wrong here

    Amazon S3 is object storage with higher latency, not optimal for session data.

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

One of 1,660 original SAP-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

4 more ways this is tested on SAP-C02

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A company is migrating a stateful application to AWS. The application uses local storage for temporary data that must survive instance restarts but not region failures. Which storage solution should the company use?

medium
  • A.Amazon EBS
  • B.Instance Store
  • C.Amazon S3
  • D.Amazon EFS

Why B: Instance Store provides ephemeral block storage that persists across instance reboots but is lost if the instance is stopped or terminated. This matches the requirement for temporary data that survives restarts but not region failures. Option A (Amazon EBS) survives stops, which is unnecessary. Option C (Amazon S3) is object storage, not temporary local storage. Option D (Amazon EFS) is a network file system, not local storage.

Variation 2. A company is migrating a stateful application to AWS. The application maintains session state in memory on the application server. Which AWS service should be used to store session state for high availability?

easy
  • A.Amazon RDS
  • B.Amazon S3
  • C.Amazon ElastiCache
  • D.Amazon EBS

Why C: Mazon ElastiCache because it is a managed in-memory caching service that can store session state with low latency and high availability across multiple nodes. Option A (Amazon RDS) is a relational database that uses disk-based storage, making it slower for session state. Option B (Amazon S3) is object storage with higher latency, unsuitable for real-time session data. Option D (Amazon EBS) is block storage attached to a single EC2 instance, not providing shared access for high availability.

Variation 3. A company is migrating a multi-tier web application to AWS. The application uses sticky sessions (session affinity). The company wants to use an Application Load Balancer (ALB). How should the architect configure the ALB to support sticky sessions?

medium
  • A.Configure the ALB listener to use a custom header for session affinity.
  • B.Enable stickiness on the target group and set a cookie expiration duration.
  • C.Use a Network Load Balancer (NLB) and enable proxy protocol.
  • D.Place an Amazon ElastiCache cluster in front of the ALB to store session data.

Why B: ALB supports sticky sessions by enabling stickiness on the target group and setting a cookie expiration duration. Option A is wrong because ALB uses cookies for session affinity, not a custom header. Option C is wrong because the question specifies using an ALB, not an NLB, and proxy protocol is for preserving client IP, not sticky sessions. Option D is wrong because placing ElastiCache in front of the ALB is not a load balancer configuration; it is an external solution for storing session data.

Variation 4. A company is migrating a stateful application to AWS. The application runs on a single on-premises server and uses local storage for persistent data. The company wants to achieve high availability and scalability. Which migration approach should the company use?

medium
  • A.Use multiple EC2 instances behind an Application Load Balancer with sticky sessions.
  • B.Lift and shift to a single Amazon EC2 instance with an EBS volume.
  • C.Refactor the application to store state in Amazon ElastiCache or Amazon DynamoDB.
  • D.Use an EC2 Auto Scaling group with lifecycle hooks to persist state to EBS snapshots.

Why C: The application is stateful and needs high availability and scalability. Refactoring to store state in managed services like Amazon ElastiCache or DynamoDB decouples state from compute, allowing compute to scale and be replaced without data loss. Option A is wrong: while an ALB with sticky sessions distributes traffic, it ties sessions to specific instances, making scaling and failover complex and not fully HA. Option B is wrong: a single EC2 instance is a single point of failure and cannot scale. Option D is wrong: EBS snapshots are for backup/disaster recovery, not real-time HA or state persistence during scaling. Only option C properly addresses state management for HA and scalability.

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.