AWS Certified Developer Associate DVA-C02 Practice Question
Your development team is tasked with optimizing a backend AWS Lambda function for an online sports trivia game. The Lambda function will receive player responses through Amazon API Gateway and needs to process them efficiently during high-traffic events such as live sports matches. Considering the need to adhere to stateless design principles, which method should you employ to temporary store session-specific data needed within a single game?
Write session-specific data to Amazon Elastic File System (EFS) mounted to the Lambda function.
Maintain temporary game state using Lambda environment variables.
Store session-specific data in Amazon ElastiCache for Redis.
Persist session-specific data in Amazon DynamoDB with short expiry TTL.
Using Amazon ElastiCache for Redis is the best option for temporary session-specific data storage for a stateless Lambda function. Redis provides fast, in-memory data storage and retrieval, which is ideal for the ephemeral nature of session data within a single game session, without persisting state in the Lambda function itself. Amazon DynamoDB would not be considered the best choice for this scenario as it is more suited for durable storage, and the speed and efficiency of in-memory caching are favorable for temporary session data during peak times. Using Lambda environment variables or writing data to Amazon EFS is incorrect because these would not allow Lambda to maintain statelessness, as environment variables are not meant for transaction-specific data, and EFS would introduce data persistence and cross-invocation state that violates stateless principles.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is Amazon ElastiCache for Redis and why is it suitable for session data?
Open an interactive chat with Bash
What are some advantages of using Redis for temporary session data storage?
Open an interactive chat with Bash
What are the drawbacks of using Amazon DynamoDB for session-specific data?
Open an interactive chat with Bash
AWS Certified Developer Associate DVA-C02
Development with AWS Services
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access