DVA-C02 exam dumps

DVA-C02 practice question 17 of 399

AWS Certified Developer - Associate. Associate level, Amazon Web Services. Free question with the correct answer and a full explanation.

DVA-C02 Question 17

Select 3

You are designing a serverless application using AWS Lambda and API Gateway. The application needs to handle user session data to track user preferences during their interaction. Which of the following statements accurately describe the behavior of stateful and stateless services in this scenario?

  1. A

    Lambda functions are inherently stateless and require an external data store to maintain session data.

  2. B

    API Gateway is a stateful service that can store user session data directly.

  3. C

    You can implement a stateful behavior in your application by using Amazon DynamoDB or Amazon ElastiCache to store session data.

  4. D

    Stateless services like AWS Lambda do not retain information between invocations.

  5. E

    Stateful services are required for scaling API Gateway to handle a large number of concurrent requests.

Show answer and explanation

Correct answers: A, C, D

Explanation

In a serverless architecture, AWS Lambda and API Gateway are stateless services, meaning they do not retain session data across invocations or requests. To manage session data, developers must use external stateful data stores like Amazon DynamoDB or Amazon ElastiCache. This design ensures scalability and reliability by decoupling the application logic from state management.

  • A. Correct.

    Correct: AWS Lambda functions are inherently stateless, meaning they do not retain any data between invocations. To maintain session data, an external data store like DynamoDB or ElastiCache is required.

  • B. Incorrect.

    Incorrect: API Gateway is also stateless and does not store user session data directly. It primarily serves as a gateway to route requests to backend services.

  • C. Correct.

    Correct: Using external stateful services like Amazon DynamoDB or Amazon ElastiCache is a common approach to implement stateful behavior in stateless applications.

  • D. Correct.

    Correct: Stateless services like AWS Lambda do not retain any information about previous invocations, making them scalable and lightweight.

  • E. Incorrect.

    Incorrect: API Gateway is stateless by design. Its scalability is not tied to maintaining state but to its ability to handle and route requests efficiently.

Timed practice exam

Take a DVA-C02 practice test under exam conditions

65 questions in 130 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam