nerdexam
Amazon

DVA-C02 · Question #448

A developer is writing an application that will run on Amazon EC2 instances in an Auto Scaling group. The developer wants to externalize the session state to support the application. Which AWS service

The correct answer is A. Amazon DynamoDB C. Amazon ElastiCache. DynamoDB (A) and ElastiCache (C) are correct because both are managed, scalable data stores that can hold session state outside of EC2 instances - essential when Auto Scaling adds or removes instances and you can't rely on in-memory local state. DynamoDB provides persistent, low-

Submitted by yousef_jo· Mar 5, 2026Development with AWS Services

Question

A developer is writing an application that will run on Amazon EC2 instances in an Auto Scaling group. The developer wants to externalize the session state to support the application. Which AWS services or resources can the developer use to meet these requirements? (Choose two.)

Options

  • AAmazon DynamoDB
  • BAmazon Cognito
  • CAmazon ElastiCache
  • DApplication Load Balancer
  • EAmazon Simple Queue Service (Amazon SQS)

How the community answered

(31 responses)
  • A
    84% (26)
  • B
    3% (1)
  • D
    10% (3)
  • E
    3% (1)

Explanation

DynamoDB (A) and ElastiCache (C) are correct because both are managed, scalable data stores that can hold session state outside of EC2 instances - essential when Auto Scaling adds or removes instances and you can't rely on in-memory local state. DynamoDB provides persistent, low-latency key-value storage, while ElastiCache (Redis or Memcached) offers in-memory caching ideal for fast session lookups.

Why the distractors are wrong:

  • Cognito (B) handles user authentication and identity, not session state storage.
  • Application Load Balancer (D) has sticky sessions, but that pins users to specific instances - it doesn't externalize state, and it breaks down when instances are terminated.
  • SQS (E) is a message queue for decoupling services, not a data store for session persistence.

Memory tip: Think "externalize = shared store." When Auto Scaling kills an instance, only a database or cache outside the instance survives. Ask yourself: "Can multiple instances read/write this at the same time?" - DynamoDB and ElastiCache say yes; ALB, Cognito, and SQS do not fit that role.

Topics

#Session management#Stateless applications#Caching#NoSQL databases

Community Discussion

No community discussion yet for this question.

Full DVA-C02 Practice