CCNA Workload-Specific Database Design Questions

69 of 444 questions · Page 6/6 · Workload-Specific Database Design · Answers revealed

376
MCQmedium

A company is migrating an on-premises Oracle OLTP database to Amazon Aurora PostgreSQL. The database has a complex schema with stored procedures, triggers, and sequences. During the migration, the team notices that the conversion tool reports several incompatibilities. Which strategy should the team use to handle the database schema changes with minimal downtime?

A.Deploy Amazon RDS for PostgreSQL with Babelfish to run Oracle PL/SQL code natively.
B.Use AWS Database Migration Service (DMS) with the AWS Schema Conversion Tool (SCT) to convert the schema and migrate data, then handle remaining incompatibilities during a cutover window.
C.Use pg_dump and pg_restore to migrate the schema, and then test and fix any errors.
D.Manually rewrite all stored procedures and triggers to PostgreSQL syntax before migration.
AnswerB

SCT automates schema conversion, and DMS supports minimal downtime via ongoing replication.

Why this answer

Option B is correct because AWS DMS can handle ongoing replication after initial load, and the AWS Schema Conversion Tool (SCT) can convert schema. Option A is wrong because converting manually is error-prone and time-consuming. Option C is wrong because Babelfish is for SQL Server, not Oracle.

Option D is wrong because writing a custom script is not recommended given available tools.

377
MCQhard

A financial services company uses Amazon DynamoDB to store transaction records. The table has a partition key of 'account_id' and a sort key of 'transaction_time'. Recent queries for a specific account's transactions within a time range are experiencing high latency. The table has read capacity units set to auto-scaling. Which design change would most improve query performance?

A.Change the sort key to a composite attribute for better filtering.
B.Enable DynamoDB Accelerator (DAX) for the table.
C.Increase the read capacity units for the table.
D.Create a global secondary index with a different partition key.
AnswerD

GSI with a different key distributes reads across partitions.

Why this answer

Option B is correct because using a secondary index with a different partition key can avoid hot partitions caused by frequent access to the same account. Option A (increasing RCUs) may not help if the partition is hot. Option C (changing sort key) won't help if the partition is overloaded.

Option D (DAX) caches results but doesn't fix the underlying hot partition issue.

378
Multi-Selectmedium

A company is designing a new application that requires a relational database with read replicas for reporting. The application has unpredictable traffic patterns. The company wants to minimize operational overhead and automatically scale compute capacity. Which THREE services should the company consider?

Select 3 answers
A.Amazon DynamoDB Accelerator (DAX)
B.Amazon RDS for MySQL with Multi-AZ
C.Amazon RDS for PostgreSQL with read replicas
D.Amazon Aurora Serverless v2
E.Amazon RDS Proxy
AnswersC, D, E

RDS for PostgreSQL supports read replicas, but does not auto-scale compute; however, it is a valid option if combined with other services.

Why this answer

Amazon RDS for PostgreSQL with read replicas is correct because it supports up to 15 read replicas for offloading reporting workloads, and with Multi-AZ deployment, it can automatically failover to a standby instance. However, for automatic scaling of compute capacity, you would need to combine it with a scaling solution like Aurora or use RDS for PostgreSQL with a manual scaling process, but the question specifically asks for automatic scaling, which is better addressed by Aurora Serverless v2. The read replicas provide the necessary separation for reporting without impacting the primary database.

Exam trap

The trap here is that candidates often confuse Multi-AZ with read replicas, thinking Multi-AZ provides read scaling, but Multi-AZ only provides a standby for failover, not read endpoints.

379
MCQmedium

Refer to the exhibit. A company uses this DynamoDB table to store user session data. The application frequently queries by user_id alone to get all sessions for a user. However, the query is slow. What is the most likely cause?

A.The table's partition key is session_id, not user_id, so querying by user_id requires a scan.
B.The table has no sort key on user_id.
C.The table has too many items, causing slow scans.
D.The provisioned read capacity is too low.
AnswerA

Without a GSI on user_id, queries on user_id are scans.

Why this answer

The table's primary key is session_id, not user_id. Querying by user_id without a secondary index forces DynamoDB to perform a full table scan, which reads every item and is significantly slower than a query operation. This is the most likely cause of the slow performance.

Exam trap

The trap here is that candidates often assume any attribute can be queried efficiently, failing to recognize that DynamoDB requires a primary key or index for efficient lookups, and that a scan is the fallback for non-key attributes.

How to eliminate wrong answers

Option B is wrong because a sort key on user_id would not help; the table already has a sort key (timestamp), but the issue is that user_id is not the partition key, so queries by user_id still require a scan. Option C is wrong because while a large number of items can slow scans, the fundamental problem is the access pattern mismatch (scan vs. query), not just item count. Option D is wrong because low provisioned read capacity would cause throttling (ProvisionedThroughputExceededException), not inherently slow queries; the described slowness is due to scanning, not capacity limits.

380
Multi-Selecteasy

A company is designing a database for a social media application that requires storing user profiles, posts, and follower relationships. The application needs low-latency queries for user timelines and social graph traversals. Which TWO AWS database services should the database specialist consider? (Choose TWO.)

Select 2 answers
A.Amazon Timestream
B.Amazon Neptune
C.Amazon Redshift
D.Amazon RDS for MySQL
E.Amazon DynamoDB
AnswersB, E

Neptune is a graph database purpose-built for social graph traversals.

Why this answer

Amazon Neptune is a fully managed graph database service optimized for storing and querying highly connected data, such as social graphs. It supports property graph and RDF models, enabling low-latency traversals of follower relationships and user timelines using Gremlin or SPARQL queries.

Exam trap

The trap here is that candidates may choose Amazon RDS for MySQL (Option D) thinking relational databases can handle graph queries with joins, but they fail to recognize that Neptune provides native graph traversal performance that relational databases cannot match for deeply connected data.

381
Multi-Selectmedium

A company is designing a database for a global e-commerce platform with strong consistency requirements. The database must support cross-region disaster recovery with RPO < 1 second and RTO < 1 minute. Which TWO AWS database services meet these requirements?

Select 2 answers
A.Amazon Aurora Global Database
B.Amazon RDS Multi-AZ
C.Amazon Redshift with cross-region snapshot copy
D.Amazon ElastiCache for Redis with Global Datastore
E.Amazon DynamoDB Global Tables
AnswersA, E

Aurora Global Database replicates across regions with RPO of 1 second and RTO of 1 minute.

Why this answer

Option A (Aurora Global Database) provides cross-region replication with typical RPO of 1 second and RTO of 1 minute. Option D (DynamoDB Global Tables) offers multi-region replication with eventual consistency but also supports strongly consistent reads in each region; however, for global tables, RPO is typically < 1 second and failover can be automated within seconds. Option B (RDS Multi-AZ) is single-region.

Option C (Redshift) is not designed for OLTP. Option E (ElastiCache) is in-memory and not durable.

382
MCQhard

A company uses Amazon DynamoDB for a shopping cart application. During a flash sale, write requests are throttled due to hot partitions. The access pattern is evenly distributed across items, but the partition key is the customer ID. Which design change would best mitigate throttling?

A.Enable DynamoDB adaptive capacity.
B.Change the partition key to a single value for all items.
C.Increase the provisioned write capacity to a higher fixed value.
D.Add a DAX cluster in front of DynamoDB.
AnswerA

Adaptive capacity rebalances throughput across partitions.

Why this answer

Option A is correct because DynamoDB adaptive capacity automatically adjusts throughput capacity based on traffic patterns, which helps mitigate hot partitions by redistributing unused capacity from less-accessed partitions to heavily accessed ones. This is ideal for the flash sale scenario where write requests are throttled due to uneven access across customer ID partitions, even though the overall access pattern is evenly distributed.

Exam trap

The trap here is that candidates may think increasing provisioned capacity (Option C) is the straightforward fix for throttling, but they overlook that hot partitions require a design-level solution like adaptive capacity or partition key redesign to distribute writes evenly.

How to eliminate wrong answers

Option B is wrong because changing the partition key to a single value for all items would create an extreme hot partition, causing all writes to target one partition and severely throttling the entire table. Option C is wrong because increasing provisioned write capacity to a higher fixed value does not address the root cause of hot partitions; it only increases overall throughput but still allows throttling on individual partitions if the access pattern is skewed. Option D is wrong because adding a DAX cluster in front of DynamoDB is a caching layer that primarily improves read performance and reduces read latency, but it does not mitigate write throttling or hot partition issues on the write path.

383
MCQhard

A company runs a critical Oracle database on Amazon RDS. The database has a large table that is frequently accessed by multiple applications. The team wants to implement caching to reduce the load on the database. The cached data must be strongly consistent with the database. Which caching strategy should they use?

A.Eventual consistency with DynamoDB Accelerator (DAX)
B.Read-only cache with Amazon ElastiCache
C.Write-through cache using Amazon ElastiCache
D.Lazy loading with cache-aside pattern
AnswerC

Write-through ensures data is written to cache and DB together, maintaining strong consistency.

Why this answer

Write-through cache ensures that data is written to the cache and the database simultaneously, providing strong consistency. Lazy loading can lead to stale data. Read-only cache does not help with writes.

Eventual consistency is not acceptable.

384
MCQmedium

A company is designing a database for a social media application that stores user posts. Each post can have multiple tags. The workload requires low-latency queries to find all posts with a specific tag. Which database design is most suitable?

A.Amazon ElastiCache for Memcached storing posts and tags as key-value pairs.
B.Amazon DynamoDB with a Global Secondary Index on the tag attribute.
C.Amazon RDS for MySQL with a normalized schema and JOIN queries.
D.Amazon Neptune with a graph model for tags and posts.
AnswerB

GSI provides fast query by tag.

Why this answer

Option A is correct because Amazon DynamoDB with a GSI on the tag attribute allows fast queries by tag. Option B is wrong because RDS for MySQL with a normalized schema would require joins, which are slower for this use case. Option C is wrong because ElastiCache is a cache, not a primary data store.

Option D is wrong because Neptune is for graph data, not for this simple tag lookup.

385
MCQmedium

A company runs an e-commerce platform on Amazon RDS for PostgreSQL. During a flash sale, the database experiences high write load and read replicas lag significantly. The application uses read replicas for reporting queries. Which design change would most effectively reduce replica lag without compromising write performance?

A.Increase the instance size of the primary database.
B.Add more read replicas to distribute the reporting load.
C.Migrate to Amazon Aurora with read replicas.
D.Convert the RDS instance to a Multi-AZ deployment.
AnswerC

Aurora has faster replication (typically <100ms) and is designed to handle high write loads with minimal replica lag.

Why this answer

Option C is correct because Amazon Aurora's distributed storage architecture decouples compute from storage, allowing replicas to apply redo logs with minimal overhead compared to RDS for PostgreSQL's physical replication. Aurora's replicas share the same underlying storage volume, so replica lag is significantly reduced even under heavy write loads, while write performance on the primary remains unaffected due to the asynchronous, log-based replication mechanism.

Exam trap

The trap here is that candidates assume adding more replicas or scaling the primary will solve replication lag, but they fail to recognize that the fundamental replication mechanism in RDS for PostgreSQL (streaming WAL) is the bottleneck, whereas Aurora's shared-storage architecture inherently minimizes lag.

How to eliminate wrong answers

Option A is wrong because increasing the primary instance size may improve write throughput but does not address the root cause of replica lag, which is the replication bottleneck in RDS for PostgreSQL's streaming replication; the primary's larger size does not speed up log shipping or apply on replicas. Option B is wrong because adding more read replicas does not reduce lag on existing replicas; it may even increase replication overhead on the primary, potentially worsening lag for all replicas under high write load. Option D is wrong because Multi-AZ deployment provides high availability with synchronous replication to a standby instance, but it does not create read replicas or reduce lag for reporting queries; the standby is not used for reads and does not alleviate replica lag.

386
MCQmedium

A company uses Amazon DynamoDB for a time-series IoT application. Each device sends a data point every second. The application queries data by device ID and timestamp range. Which table design is most efficient?

A.Use a composite key of device ID and timestamp as the partition key.
B.Use device ID as the partition key and a random suffix as the sort key.
C.Use timestamp as the partition key and device ID as the sort key.
D.Use device ID as the partition key and timestamp as the sort key.
AnswerD

Allows efficient range queries on timestamp per device.

Why this answer

Option D is correct because it models the access pattern directly: using device ID as the partition key ensures all data for a device is co-located, and timestamp as the sort key enables efficient range queries (e.g., Query with KeyConditionExpression on timestamp between start and end). This design avoids hot partitions and allows DynamoDB to retrieve the exact time-series slice without scanning.

Exam trap

AWS often tests the misconception that a composite partition key (device ID + timestamp) is needed for uniqueness, but the trap here is that candidates forget the sort key's role in enabling range queries and instead try to force uniqueness into the partition key, which breaks the access pattern.

How to eliminate wrong answers

Option A is wrong because using a composite key of device ID and timestamp as the partition key would create a unique partition for each data point, making it impossible to query all data for a device across a time range without a full scan. Option B is wrong because using a random suffix as the sort key destroys the natural ordering of timestamps, preventing efficient range queries and forcing a scan to filter by time. Option C is wrong because using timestamp as the partition key leads to a single hot partition for each second (or time granularity), causing throttling and poor distribution, and querying by device ID would require a scan across all partitions.

387
MCQeasy

A financial services company needs a relational database with high availability and automatic failover across three Availability Zones in us-east-1. The workload consists of OLTP transactions with occasional analytic queries. Which database solution meets these requirements?

A.Amazon RDS for MySQL with Multi-AZ (2 AZs)
B.Amazon DynamoDB global tables
C.Amazon Aurora MySQL with Multi-AZ deployment across 3 AZs
D.Amazon Redshift with cross-region snapshots
AnswerC

Aurora provides automatic failover across 3 AZs and supports OLTP and analytics.

Why this answer

Amazon Aurora MySQL with Multi-AZ deployment across 3 AZs meets the requirements because Aurora automatically replicates your data six ways across three Availability Zones, with a primary DB instance in one AZ and two read replicas in the other two AZs. In the event of a failure, Aurora automatically fails over to a read replica in under 30 seconds without data loss, providing high availability and automatic failover across three AZs. Aurora also supports both OLTP transactions and can handle occasional analytic queries via Aurora Replicas or Aurora Global Database for read scaling.

Exam trap

The trap here is that candidates often confuse RDS Multi-AZ (which only supports 2 AZs) with Aurora's native multi-AZ replication across 3 AZs, or they mistakenly think DynamoDB global tables (a NoSQL service) can replace a relational database for OLTP workloads requiring ACID transactions.

How to eliminate wrong answers

Option A is wrong because Amazon RDS for MySQL with Multi-AZ (2 AZs) only supports a standby replica in a single secondary AZ, not across three AZs, and failover is limited to two AZs, failing the requirement for three Availability Zones. Option B is wrong because Amazon DynamoDB global tables is a NoSQL key-value and document database, not a relational database, and while it provides multi-region replication, it does not support relational queries or ACID transactions in the same way as a relational database, and it does not offer automatic failover across three AZs in a single region. Option D is wrong because Amazon Redshift is a data warehouse optimized for analytic queries, not OLTP transactions, and cross-region snapshots provide disaster recovery but not automatic failover across three AZs for high availability.

388
MCQhard

A company is running a production Amazon DynamoDB table that supports a gaming application with millions of concurrent users. The table uses on-demand capacity mode. Recently, the application started experiencing throttling (ProvisionedThroughputExceededException) during peak hours. The company wants to resolve this with minimal operational overhead. What should the company do?

A.Enable DynamoDB Accelerator (DAX) to cache reads
B.Partition the table across multiple tables and use application-level sharding
C.Request a service quota increase for the on-demand table's maximum throughput
D.Switch to provisioned capacity mode with auto scaling
AnswerC

On-demand tables have default throughput limits that can be increased.

Why this answer

On-demand capacity mode in DynamoDB has a default throughput quota (typically 40,000 read/write request units per second per table, though this can vary by region and account). When traffic exceeds this soft limit, DynamoDB returns ProvisionedThroughputExceededException. Requesting a service quota increase raises this ceiling, allowing the table to handle higher bursts without throttling, and requires no architectural changes or capacity management—minimizing operational overhead.

Exam trap

The trap here is that candidates assume on-demand capacity is unlimited and never throttles, but AWS imposes a default throughput quota per table that must be explicitly raised for sustained high-traffic workloads.

How to eliminate wrong answers

Option A is wrong because DAX is an in-memory cache that reduces read latency and offloads read traffic, but it does not increase the table's write throughput quota; throttling on writes or high-volume reads that bypass DAX would still occur. Option B is wrong because application-level sharding across multiple tables adds significant operational complexity (routing logic, cross-table consistency, management overhead) and is unnecessary when a simple quota increase can resolve the throttling. Option D is wrong because switching to provisioned capacity with auto scaling introduces capacity planning and scaling lag, increasing operational overhead compared to simply raising the on-demand quota; on-demand already scales instantly within its quota limits.

389
MCQhard

A company runs a customer-facing application on Amazon RDS for MySQL. The application experiences frequent read replicas lagging behind the primary due to long-running analytics queries. The analytics team runs complex SELECT queries that scan large tables. Which design change would minimize replica lag without affecting production writes?

A.Use Amazon DynamoDB Accelerator (DAX) for caching.
B.Increase the instance size of the primary and all read replicas.
C.Enable Multi-AZ on the primary instance.
D.Create a cross-Region read replica for analytics queries.
AnswerD

Offloads analytics to a separate replica, reducing lag.

Why this answer

Creating a cross-Region read replica for analytics queries offloads the long-running SELECT statements to a separate read replica in a different AWS Region, isolating the analytics workload from the primary instance and its in-Region replicas. This prevents the analytics queries from competing for I/O and CPU resources on the primary or its local replicas, thereby minimizing replica lag without affecting production writes. Cross-Region replicas use asynchronous replication, so they can handle heavy read traffic without impacting the primary's write performance.

Exam trap

The trap here is that candidates often assume increasing instance size (Option B) or enabling Multi-AZ (Option C) will solve replica lag, but they fail to recognize that the lag is caused by resource contention from analytics queries on the same replicas, not by insufficient hardware or lack of high availability.

How to eliminate wrong answers

Option A is wrong because Amazon DynamoDB Accelerator (DAX) is an in-memory cache for DynamoDB, not for RDS for MySQL, and it does not address replica lag caused by long-running analytics queries on RDS. Option B is wrong because increasing the instance size of the primary and all read replicas may improve performance but does not isolate the analytics workload; the long-running queries on the replicas will still consume resources and cause lag, and it does not prevent the analytics queries from affecting the primary's write performance. Option C is wrong because enabling Multi-AZ on the primary instance provides high availability with a standby replica that cannot be used for reads (it is not a read replica), so it does not offload analytics queries or reduce replica lag.

390
MCQmedium

A company uses Amazon RDS for PostgreSQL for its e-commerce platform. The application team reports increasing read latency on the primary instance during sales events. Which action should be taken to reduce read load on the primary?

A.Enable Multi-AZ deployment
B.Migrate to Amazon DynamoDB
C.Create one or more read replicas
D.Increase the instance size of the primary
AnswerC

Read replicas offload read queries from primary.

Why this answer

Creating one or more read replicas offloads read traffic from the primary RDS for PostgreSQL instance, directly addressing the increased read latency during sales events. Read replicas are asynchronous replicas that can serve SELECT queries, reducing the load on the primary without requiring application changes to the write path. This is the standard AWS solution for scaling read-heavy workloads in RDS.

Exam trap

The trap here is that candidates often confuse Multi-AZ with read replicas, assuming the standby in a Multi-AZ deployment can serve reads, but in RDS for PostgreSQL the standby is not accessible for read traffic—only Oracle and SQL Server Multi-AZ deployments offer readable standbys under specific configurations.

How to eliminate wrong answers

Option A is wrong because Multi-AZ deployment provides high availability and automatic failover via synchronous standby replication, but it does not offload read traffic—the standby is not accessible for reads in RDS for PostgreSQL. Option B is wrong because migrating to DynamoDB is a complete architectural change that is unnecessary for simply reducing read load on an existing PostgreSQL database; it would require rewriting application queries and data modeling, and it does not address the immediate symptom of read latency on the primary. Option D is wrong because increasing the instance size of the primary only vertically scales the server, which can help but is less cost-effective and does not distribute read load; it also does not leverage the horizontal read scaling that read replicas provide.

391
MCQhard

A company uses Amazon DynamoDB to store IoT sensor data. Each sensor sends data every minute. The table has a partition key of sensor_id and a sort key of timestamp. The application queries data for a sensor over the last hour. The table uses on-demand capacity. Recently, the query latency increased for sensors that generate a high volume of data. The application retrieves all attributes for the sensor data. Which design change should be made to reduce latency?

A.Use DynamoDB Accelerator (DAX) for the table.
B.Create a global secondary index (GSI) with the same key structure but projecting only the required attributes.
C.Enable DynamoDB Streams to replicate data to Amazon ElastiCache.
D.Increase the read capacity units (RCUs) on the table.
AnswerB

A GSI with projected attributes reduces the amount of data read, lowering latency.

Why this answer

Option B is correct because creating a GSI with the same key structure but projecting only the required attributes reduces the amount of data read from the base table. Since the application retrieves all attributes, but the GSI can be designed to project only the necessary columns, this minimizes read I/O and reduces latency. This is especially effective for sensors with high data volume, as it avoids fetching large item payloads from the base table.

Exam trap

The trap here is that candidates assume DAX is the universal solution for read latency, but the real issue is the volume of data read per query, not cache misses, making GSI projection the correct optimization.

How to eliminate wrong answers

Option A is wrong because DAX is an in-memory cache that accelerates reads by caching hot data, but it does not reduce the amount of data read from DynamoDB; it only speeds up repeated queries. For high-volume sensors, the latency increase is due to reading large items, not cache misses. Option C is wrong because DynamoDB Streams replicate data to ElastiCache asynchronously, which adds complexity and introduces eventual consistency, not reducing query latency for real-time reads.

Option D is wrong because the table uses on-demand capacity, which automatically scales RCUs; increasing RCUs is not applicable and would not reduce latency caused by reading large items.

392
MCQeasy

Refer to the exhibit. A developer created a DynamoDB table 'UserSessions' with a simple primary key. The application needs to query by user_id as well. What design change should the developer make to support this query efficiently?

A.Use a Scan operation with a filter
B.Add a sort key to the table
C.Create a Local Secondary Index on user_id
D.Create a Global Secondary Index on user_id
AnswerD

A GSI enables efficient querying on user_id.

Why this answer

Option D is correct because a Global Secondary Index (GSI) on user_id allows efficient querying by user_id without altering the base table's primary key structure. The base table uses a simple primary key (likely session_id), and a GSI provides a separate index with its own partition key (user_id) to support non-key attribute queries with eventual consistency, enabling the application to query by user_id efficiently without scanning the entire table.

Exam trap

AWS often tests the misconception that a Local Secondary Index can be used to query on any attribute, but the trap here is that an LSI requires the same partition key as the base table, so it cannot index user_id as a partition key unless user_id is already the base table's partition key.

How to eliminate wrong answers

Option A is wrong because a Scan operation with a filter reads every item in the table, incurring high read capacity consumption and latency, which is inefficient for frequent queries. Option B is wrong because adding a sort key to the table would change the primary key structure, requiring a new table or migration, and does not directly support querying by user_id unless user_id is already the partition key. Option C is wrong because a Local Secondary Index (LSI) can only be created at table creation time and shares the same partition key as the base table; if the base table's partition key is not user_id, an LSI cannot index user_id as a partition key, making it unsuitable for this use case.

393
Multi-Selecteasy

Which TWO design patterns are commonly used to handle hot partitions in Amazon DynamoDB? (Choose 2.)

Select 2 answers
A.Write sharding
B.Decreasing write capacity units
C.Using a single partition key
D.Increasing read capacity units
E.Adding random suffixes to partition keys
AnswersA, E

Distributes writes across many partition key values.

Why this answer

Write sharding distributes writes across multiple partition keys to prevent a single partition from exceeding the 1,000 WCU limit. Adding random suffixes to partition keys is a specific write sharding technique that spreads writes across many partitions, avoiding hot spots.

Exam trap

AWS often tests the misconception that increasing capacity units alone resolves hot partitions, but the real solution requires redistributing the workload across partitions via sharding or suffix-based strategies.

394
MCQhard

An e-commerce platform uses Amazon DynamoDB for a shopping cart table with partition key 'user_id' and sort key 'product_id'. The table experiences throttled write requests during flash sales. The access pattern includes reading the entire cart at checkout. Which design change would improve write performance without changing the read pattern?

A.Enable DynamoDB Accelerator (DAX) to cache writes
B.Increase the provisioned write capacity units (WCU) to a higher value
C.Change the table design to use only partition key 'user_id' and remove the sort key
D.Enable DynamoDB Adaptive Capacity and ensure the table uses on-demand capacity mode
AnswerD

Adaptive capacity helps distribute traffic across partitions, and on-demand mode handles spikes.

Why this answer

Option C is correct because DynamoDB adaptive capacity automatically adjusts partitions based on traffic patterns, mitigating hot keys. Option A (increase WCU) doesn't solve hot key issue. Option B (DAX) improves read, not write.

Option D (remove sort key) would break the data model.

395
Multi-Selectmedium

Which TWO factors should you consider when choosing between Amazon RDS and Amazon DynamoDB for a new application?

Select 2 answers
A.RDS requires a predefined schema, while DynamoDB is schema-less.
B.DynamoDB can only be accessed from within a VPC, while RDS can be public.
C.Only RDS supports Multi-AZ deployments for high availability.
D.Both services support encryption at rest and in transit.
E.DynamoDB is better suited for unstructured data, while RDS is better for structured data with complex relationships.
AnswersA, E

This is a key difference that affects application design.

Why this answer

Option B is correct because DynamoDB uses a NoSQL model, while RDS uses relational. Option E is correct because DynamoDB supports flexible schema, while RDS requires fixed schema. Option A is wrong because both support encryption.

Option C is wrong because both support VPC. Option D is wrong because both support multi-AZ deployments (RDS Multi-AZ, DynamoDB global tables).

396
MCQeasy

A startup is building a social media application with a news feed feature. The feed must be personalized and updated in real-time as users post. Which AWS database service is best suited for this workload?

A.Amazon DynamoDB with Global Secondary Indexes
B.Amazon S3 with Select and Glacier
C.Amazon RDS for PostgreSQL with read replicas
D.Amazon ElastiCache for Redis with sorted sets and pub/sub
AnswerD

Redis provides real-time data structures and pub/sub for feeds.

Why this answer

Option C is correct because Amazon ElastiCache for Redis supports sorted sets and pub/sub, ideal for real-time feeds. Option A is wrong because DynamoDB is optimized for key-value access, not for real-time feed aggregation across many users. Option B is wrong because RDS is not designed for sub-millisecond real-time updates.

Option D is wrong because S3 is object storage, not a database for real-time queries.

397
MCQhard

A company uses Amazon DynamoDB as the primary database for a global gaming application. The application requires single-digit millisecond latency for user profile lookups by user ID. However, some queries need to retrieve all active users in a region (e.g., 'us-east-1') for administrative dashboards, and these queries currently perform full table scans, causing high costs and throttling. What design approach should be taken to optimize this?

A.Implement DynamoDB Accelerator (DAX) to cache the dashboard queries.
B.Increase the read capacity units (RCUs) on the base table.
C.Create a global secondary index (GSI) on the region attribute.
D.Create a local secondary index (LSI) on the region attribute.
AnswerC

A GSI allows efficient querying on region without scanning the base table, reducing cost and throttling.

Why this answer

Option C is correct because creating a Global Secondary Index (GSI) on the 'region' attribute allows the administrative dashboard queries to retrieve all active users in a specific region using an efficient index scan instead of a full table scan. This reduces read capacity consumption, avoids throttling, and maintains single-digit millisecond latency for the indexed queries, while the base table remains optimized for user ID lookups.

Exam trap

The trap here is that candidates often confuse LSIs with GSIs, assuming an LSI can be used to query by a non-key attribute like region, but LSIs are limited to the same partition key as the base table and cannot avoid a full scan when the query predicate is on a different partition key.

How to eliminate wrong answers

Option A is wrong because DynamoDB Accelerator (DAX) is an in-memory cache that accelerates reads on the base table or existing indexes, but it does not eliminate the need for a full table scan when querying by region; it would only cache the results of expensive scans, not prevent them. Option B is wrong because increasing read capacity units (RCUs) on the base table would temporarily reduce throttling but does not address the root cause—full table scans are inherently inefficient and costly at scale, and higher RCUs only mask the problem while increasing costs. Option D is wrong because a Local Secondary Index (LSI) can only be created at table creation time and shares the same partition key as the base table; since the base table's partition key is user ID (not region), an LSI on region would still require a full scan across all partitions to retrieve all users in a region, providing no performance benefit.

398
MCQhard

A company uses Amazon DynamoDB for a gaming leaderboard. The application updates scores frequently. Reads must be strongly consistent, and writes must be optimized for cost. Which table design minimizes cost while meeting consistency requirements?

A.Use Amazon DynamoDB Accelerator (DAX) for caching.
B.Use eventually consistent reads with a conditional write.
C.Store scores in Amazon S3 and use S3 Select for reads.
D.Use DynamoDB Streams to replicate reads to a separate table.
AnswerA

DAX provides in-memory caching with strong consistency, reducing RCU cost.

Why this answer

Amazon DynamoDB Accelerator (DAX) provides an in-memory cache that supports strongly consistent reads, which meets the application's requirement for strongly consistent reads. By caching frequently accessed leaderboard data, DAX reduces the number of read capacity units consumed from the DynamoDB table, thereby lowering read costs. Writes are still performed directly on the DynamoDB table, and DAX does not affect write costs, so the design optimizes overall cost while maintaining consistency.

Exam trap

The trap here is that candidates may assume that eventually consistent reads are sufficient for a leaderboard, or that caching with DAX is only for performance and not for cost optimization, but the question explicitly requires strongly consistent reads and cost minimization, making DAX the correct choice.

How to eliminate wrong answers

Option B is wrong because eventually consistent reads do not meet the requirement for strongly consistent reads, and conditional writes are used for optimistic locking, not for consistency or cost optimization. Option C is wrong because storing scores in Amazon S3 and using S3 Select for reads introduces significant latency and does not support the low-latency, high-frequency updates required for a gaming leaderboard; S3 is not designed for real-time strongly consistent reads. Option D is wrong because using DynamoDB Streams to replicate reads to a separate table adds complexity, latency, and additional storage costs without providing strongly consistent reads from the replica; DynamoDB Streams is for change data capture, not for read consistency.

399
Multi-Selecthard

A company is designing a document database on Amazon DocumentDB for a content management system. Which TWO design practices improve query performance and reduce costs?

Select 2 answers
A.Shard data based on access patterns to distribute load.
B.Design documents to avoid joins by frequently using $lookup.
C.Avoid denormalization to maintain strict normal forms.
D.Store all documents in a single collection without indexes to reduce overhead.
E.Use appropriate indexes to support common query patterns.
AnswersA, E

Sharding improves scalability.

Why this answer

Sharding data based on access patterns (Option A) improves query performance by distributing read/write load across multiple shards, reducing contention and latency. In Amazon DocumentDB, sharding is achieved through a cluster with multiple instances, and aligning shard keys with access patterns ensures even data distribution and efficient query routing. This also reduces costs by allowing you to scale horizontally only when needed, avoiding over-provisioning of larger instances.

Exam trap

The trap here is that candidates often confuse sharding with partitioning in relational databases or assume that avoiding indexes reduces overhead, but in DocumentDB, indexes are critical for performance and sharding is a horizontal scaling strategy that directly impacts cost and query speed.

400
MCQhard

A company uses Amazon DynamoDB for a real-time analytics platform. The table has a partition key of 'customer_id' and a sort key of 'event_timestamp'. The table receives 50,000 write requests per second, evenly distributed across 10,000 customers. The application frequently queries the last 10 events for a given customer. The company notices that some queries are throttled during peak hours. The table's write capacity is set to 50,000 WCUs, and read capacity to 10,000 RCUs. The throttled queries are read requests. What is the most likely cause of the throttling, and what should be done to resolve it?

A.Increase the write capacity units to handle the write load.
B.Increase the read capacity units to 20,000 RCUs.
C.Optimize the query by using Query with KeyConditionExpression on the sort key and Limit=10.
D.Add a global secondary index with the same keys to distribute read load.
AnswerC

This ensures the query reads only the necessary items, reducing RCU consumption.

Why this answer

The throttling occurs because the application uses Scan or an inefficient query pattern that consumes excessive read capacity. Using Query with KeyConditionExpression on the sort key and Limit=10 retrieves only the last 10 events per customer efficiently, reducing read consumption and avoiding throttling without increasing RCUs.

Exam trap

Cisco often tests the misconception that throttling always requires increasing capacity, when in fact optimizing the access pattern with Query and Limit can resolve the issue without additional cost.

How to eliminate wrong answers

Option A is wrong because the issue is read throttling, not write throttling, and write capacity is already sufficient at 50,000 WCUs. Option B is wrong because increasing RCUs to 20,000 would mask the inefficiency without addressing the root cause—poor query design that consumes more capacity than necessary. Option D is wrong because adding a GSI with the same keys would not distribute read load differently; the base table already has the required keys, and a GSI would not improve query efficiency for this access pattern.

401
MCQhard

Refer to the exhibit. A database specialist is troubleshooting an issue where an application cannot connect to an RDS for MySQL instance using IAM database authentication. The application uses the database user 'db_user1'. The IAM policy shown is attached to the IAM role used by the application. What is the most likely reason for the connection failure?

A.The action 'rds-db:connect' is not allowed for RDS MySQL.
B.The policy should have 'Deny' effect instead of 'Allow'.
C.The resource ARN in the policy uses an incorrect RDS resource ID.
D.The database user name in the ARN must be 'admin', not 'db_user1'.
AnswerC

The RDS resource ID must be exactly 14 alphanumeric characters. The example has 18.

Why this answer

Option C is correct because IAM database authentication for RDS MySQL requires the resource ARN in the IAM policy to include the correct RDS resource ID (the 'db-xxxxx' identifier from the RDS console), not the DB instance name or endpoint. If the ARN uses an incorrect resource ID, the policy will not match the target RDS instance, causing the authentication to fail even if the user name and action are correct.

Exam trap

The trap here is that candidates often confuse the DB instance name or endpoint with the RDS resource ID, or assume the database user must be 'admin' for IAM authentication, when in fact the resource ID is a separate identifier and the user name must match the database user exactly.

How to eliminate wrong answers

Option A is wrong because the 'rds-db:connect' action is specifically allowed for RDS MySQL when using IAM database authentication; it is the required action for connecting. Option B is wrong because a 'Deny' effect would explicitly block the connection, whereas the goal is to allow it; the 'Allow' effect is correct for granting access. Option D is wrong because the database user name in the ARN must match the actual database user (here 'db_user1'), not 'admin'; the ARN format includes the database user name as it exists in the MySQL instance.

402
MCQhard

An IAM policy is attached to an application role that accesses a DynamoDB table named 'Orders'. The table has a global secondary index named 'OrderDateIndex'. The application needs to write new orders and query the index. Based on the exhibit, will the application be able to perform these operations?

A.Yes, but only writes are allowed; index queries are denied.
B.Yes, the policy allows both writes and querying the index.
C.No, the policy does not grant access to the index.
D.No, the policy denies Query on the index.
AnswerB

PutItem allowed on table, Query allowed on index.

Why this answer

The policy allows PutItem on the table, so writes are allowed. For querying the index, the policy explicitly allows GetItem and Query on the index resource. However, the index resource ARN is correct.

Therefore, both operations are allowed. Option B is wrong because the index is not denied; Option C is wrong because the policy includes the index; Option D is wrong because the policy covers both.

403
MCQmedium

A company is designing a new application that requires a relational database with sub-millisecond read latency for a global user base. The workload is read-heavy with occasional writes. Which database solution should they choose?

A.Amazon DynamoDB with DAX
B.Amazon RDS for MySQL with Multi-AZ
C.Amazon Aurora with Auto Scaling
D.Amazon ElastiCache for Redis
AnswerC

Aurora provides low latency (single-digit ms) and is relational; Auto Scaling handles read scaling.

Why this answer

Amazon Aurora with Auto Scaling is the correct choice because it provides a relational database (MySQL/PostgreSQL-compatible) with sub-millisecond read latency via its distributed storage layer and read replicas. The read-heavy workload benefits from Aurora's automatic scaling of read capacity, while occasional writes are efficiently handled by the cluster volume. Aurora's architecture decouples compute and storage, enabling fast failover and consistent performance for global users.

Exam trap

The trap here is that candidates may confuse DynamoDB with DAX (which offers sub-millisecond latency) as a relational database, but DynamoDB is NoSQL and does not support relational features like joins or ACID transactions across multiple tables.

How to eliminate wrong answers

Option A is wrong because Amazon DynamoDB with DAX is a NoSQL key-value/document database, not a relational database, and while DAX provides microsecond latency for reads, the question explicitly requires a relational database. Option B is wrong because Amazon RDS for MySQL with Multi-AZ provides high availability but does not achieve sub-millisecond read latency; typical RDS read latency is in the single-digit milliseconds, and Multi-AZ is for failover, not read performance. Option D is wrong because Amazon ElastiCache for Redis is an in-memory cache, not a relational database; it can accelerate reads but does not serve as the primary relational database with ACID transactions and SQL querying.

404
MCQeasy

A startup is building a real-time chat application that requires storing messages with high write throughput and low-latency reads. The data model is simple: each message has a conversation ID, timestamp, and content. Which database design is MOST appropriate?

A.Amazon RDS for MySQL with a single table and indexes on conversation_id and timestamp
B.Amazon Timestream to store messages as time-series data
C.Amazon Redshift with columnar storage and compression
D.Amazon DynamoDB with conversation_id as partition key and timestamp as sort key
AnswerD

This model supports high write throughput and efficient queries by conversation.

Why this answer

Option C is correct because DynamoDB is a NoSQL database that can handle high write throughput and low-latency reads with a simple key-value model. Option A is wrong because RDS may struggle with high write throughput. Option B is wrong because Timestream is for time-series, not chat messages.

Option D is wrong because Redshift is for analytics.

405
Multi-Selectmedium

Which THREE factors should be considered when choosing between Amazon RDS and Amazon DynamoDB for a new application? (Choose 3.)

Select 3 answers
A.Cost of storage
B.Need for encryption at rest
C.Access patterns (predictable vs. ad-hoc)
D.Scalability requirements (horizontal vs. vertical)
E.Query complexity (joins, aggregations)
AnswersC, D, E

DynamoDB suits predictable patterns; RDS for complex queries.

Why this answer

Amazon RDS is a relational database service that excels at complex queries involving joins and aggregations, while DynamoDB is a NoSQL key-value and document database optimized for predictable, high-scale access patterns. The choice between them hinges on whether the application requires relational features (RDS) or can tolerate denormalized schemas for low-latency, horizontal scaling (DynamoDB). Option C is correct because DynamoDB is designed for ad-hoc, single-key lookups and simple queries, whereas RDS supports complex, ad-hoc SQL queries with joins.

Exam trap

The trap here is that candidates often assume encryption at rest is exclusive to one service, but both RDS and DynamoDB support it via AWS KMS, making it a non-differentiating factor.

406
Multi-Selecteasy

A company uses Amazon RDS for PostgreSQL for its CRM application. The application experiences intermittent spikes in read traffic. Which TWO actions can the company take to improve read scalability with minimal application changes?

Select 2 answers
A.Enable Multi-AZ deployment for automatic failover.
B.Migrate to Amazon Aurora and enable Auto Scaling.
C.Create one or more read replicas in the same region.
D.Upgrade to a larger DB instance class.
E.Enable Amazon RDS Proxy to manage database connections.
AnswersC, E

Read replicas handle read traffic without application changes.

Why this answer

Option C is correct because creating read replicas in Amazon RDS for PostgreSQL offloads read traffic from the primary DB instance, directly addressing intermittent read spikes with minimal application changes. Read replicas are asynchronous replicas that can serve read queries, and the application only needs to update its connection string to point to the replica endpoint for read operations.

Exam trap

The trap here is that candidates often confuse Multi-AZ (which provides failover but no read scaling) with read replicas, or assume that scaling up the instance class is the only way to handle read spikes, ignoring the horizontal scaling benefit of read replicas with minimal application changes.

407
MCQmedium

A company is investigating a performance issue with an Amazon Aurora MySQL database. The output of the describe-db-instances command is shown. The application experiences intermittent slowdowns during write-heavy periods. Which change would MOST likely improve write performance?

A.Add an Aurora Replica to distribute read traffic and reduce load on the writer
B.Increase the provisioned IOPS to 10000
C.Change StorageType to gp2 and increase AllocatedStorage to 200 GB
D.Set StorageEncrypted to false to reduce encryption overhead
AnswerA

Adding replicas offloads reads, freeing the writer for writes.

Why this answer

Option D is correct because Aurora's write performance is tied to cluster size; adding more nodes can distribute load. Option A is wrong because Aurora uses its own storage; changing to gp2 is not applicable. Option B is wrong because disabling encryption would compromise security and may not improve performance.

Option C is wrong because Aurora MySQL does not have a provisioned IOPS setting like RDS.

408
MCQmedium

A company needs to run complex analytical queries on structured data in Amazon S3 without loading data into a database. The queries must execute quickly and support standard SQL. Which service should they use?

A.Amazon QuickSight
B.AWS Glue ETL jobs
C.Amazon Redshift Spectrum
D.Amazon Athena
AnswerD

Serverless, queries S3 directly with SQL.

Why this answer

Amazon Athena is an interactive query service that analyzes data in S3 using standard SQL. Option B (Redshift Spectrum) also works but requires a Redshift cluster. Option C (Glue ETL) is for ETL jobs.

Option D (QuickSight) is a BI tool.

409
MCQeasy

A company runs an application that requires a relational database with high availability across multiple Availability Zones. The database must automatically failover with minimal downtime. Which AWS service meets these requirements?

A.Amazon RDS for MySQL with Multi-AZ deployment.
B.Amazon DynamoDB with global tables.
C.Amazon Redshift with cross-Region snapshots.
D.Amazon RDS for MySQL with a single instance.
AnswerA

Automatic failover to standby in different AZ.

Why this answer

Amazon RDS for MySQL with Multi-AZ deployment automatically provisions and maintains a synchronous standby replica in a different Availability Zone. If the primary instance fails, Amazon RDS automatically fails over to the standby, typically within 60–120 seconds, providing high availability with minimal downtime. This meets the requirement for a relational database with automatic failover across multiple Availability Zones.

Exam trap

The trap here is that candidates may confuse DynamoDB global tables (multi-Region replication) with Multi-AZ failover, or assume that a single RDS instance with automated backups provides the same availability as Multi-AZ, but automated backups do not provide automatic failover or synchronous replication.

How to eliminate wrong answers

Option B is wrong because Amazon DynamoDB is a NoSQL key-value and document database, not a relational database, and global tables provide multi-Region replication, not the Multi-AZ failover required. Option C is wrong because Amazon Redshift is a data warehouse, not a transactional relational database, and cross-Region snapshots are manual or scheduled backups, not automatic failover. Option D is wrong because a single-instance Amazon RDS for MySQL deployment does not provide Multi-AZ redundancy or automatic failover; it runs in a single Availability Zone and requires manual recovery if the instance fails.

410
MCQmedium

A company is migrating its on-premises MySQL database to Amazon Aurora MySQL. The current database has a table of 500 GB that is accessed by a nightly batch job that updates 80% of the rows. The company wants to minimize downtime during migration. Which migration strategy is MOST appropriate?

A.Use AWS Database Migration Service (DMS) with Aurora as the target.
B.Create an Aurora read replica from the on-premises database.
C.Export the data to Amazon S3 and load it into Aurora using the LOAD DATA FROM S3 command.
D.Use mysqldump to export the database and import it into Aurora.
AnswerA

DMS allows ongoing replication, minimizing downtime.

Why this answer

Option B is correct because using AWS DMS with Aurora MySQL as the target allows a full load plus ongoing replication to minimize downtime. Option A is wrong because mysqldump would require application downtime during the dump and restore. Option C is wrong because an Aurora read replica can only be created from an existing Aurora instance, not from on-premises.

Option D is wrong because S3 export/import is for data warehousing, not for minimal downtime migration.

411
MCQmedium

A data analyst reports that a nightly ETL job to Amazon Redshift is failing with timeout errors shown in the exhibit. The cluster is a dc2.large with 2 nodes. The ETL job inserts large volumes of data. What is the most likely cause?

A.The cluster has reached the maximum number of connections.
B.The workload manager (WLM) queue timeout is too low.
C.The security group is blocking inbound traffic from the ETL server.
D.The cluster has insufficient disk space for the data load.
AnswerD

dc2 nodes use local SSD; full disk causes write failures.

Why this answer

Option C is correct because dc2 nodes have limited local SSD storage; if the cluster runs out of disk space, writes time out. Option A is wrong because Redshift does not have a max_connections parameter like RDS. Option B is wrong because network ACLs would cause connection failures, not timeouts after connection.

Option D is wrong because WLM queue timeouts cause different errors.

412
MCQhard

A company runs a document management system using Amazon DocumentDB (with MongoDB compatibility). The application stores large documents (up to 5 MB each) and frequently fetches them by document ID. The team notices increased latency during peak hours. They need to reduce read latency. Which action is MOST effective?

A.Add read replicas to the cluster
B.Shard the collection across multiple DocumentDB clusters
C.Implement Amazon ElastiCache for Redis in front of DocumentDB
D.Increase the instance class of the primary instance
AnswerA

Read replicas offload read traffic and reduce latency.

Why this answer

Adding read replicas to the DocumentDB cluster is the most effective action because it offloads read traffic from the primary instance, directly reducing read latency during peak hours. DocumentDB supports up to 15 read replicas that are kept in sync via the cluster's replication mechanism, and the application's frequent fetches by document ID are read-heavy operations that benefit from distributing the load across multiple replicas.

Exam trap

AWS often tests the misconception that scaling up the primary instance (Option D) is equivalent to scaling out read capacity, but in DocumentDB, read replicas are the correct solution for read-heavy workloads because they provide horizontal read scaling without overloading the primary.

How to eliminate wrong answers

Option B is wrong because sharding across multiple DocumentDB clusters is not a native feature of DocumentDB; DocumentDB does not support horizontal sharding like MongoDB, and managing multiple clusters manually would introduce complexity without reducing read latency for individual document fetches. Option C is wrong because implementing Amazon ElastiCache for Redis in front of DocumentDB adds an additional caching layer that, while potentially beneficial for repeated queries, introduces cache management overhead and does not address the root cause of increased latency during peak hours for direct document ID lookups. Option D is wrong because increasing the instance class of the primary instance only scales the compute and memory resources of a single node, which does not distribute the read load and may still result in latency under high concurrent read traffic.

413
MCQmedium

A company uses Amazon RDS for Oracle for an OLTP application. The database experiences high CPU utilization during peak hours. The application is read-heavy and can tolerate eventually consistent reads. Which solution reduces CPU load on the primary database with minimal application changes?

A.Implement Amazon ElastiCache to cache frequent queries
B.Upgrade to a larger instance type
C.Create an RDS read replica and direct read traffic to it
D.Use DynamoDB Accelerator (DAX) as a cache layer
AnswerC

Read replicas offload read traffic from the primary, reducing CPU load with minimal application changes.

Why this answer

Option C is correct because creating an RDS Read Replica offloads read traffic from the primary Oracle instance, directly reducing CPU utilization on the primary. Since the application is read-heavy and tolerates eventually consistent reads, the replica’s asynchronous replication lag is acceptable. This solution requires minimal application changes—only modifying the connection string to route SELECT queries to the replica endpoint.

Exam trap

The trap here is that candidates assume caching (ElastiCache or DAX) is the only way to reduce read load, but they overlook that RDS Read Replicas directly offload the database engine’s CPU without requiring application caching logic or a different database service.

How to eliminate wrong answers

Option A is wrong because Amazon ElastiCache caches query results in memory, but it requires application code changes to implement cache-aside or lazy loading patterns, and it does not offload database CPU for queries that miss the cache. Option B is wrong because upgrading to a larger instance type increases capacity but does not reduce CPU load; it only postpones the issue and incurs higher cost without addressing the root cause of read-heavy traffic. Option D is wrong because DynamoDB Accelerator (DAX) is an in-memory cache for Amazon DynamoDB, not for Amazon RDS for Oracle; it cannot be used to cache Oracle queries or reduce CPU on an RDS instance.

414
Multi-Selecteasy

A company needs to choose a database for a real-time analytics workload that requires sub-second query latency on streaming data. Which TWO AWS services are most suitable?

Select 2 answers
A.Amazon Neptune.
B.Amazon RDS for PostgreSQL with materialized views.
C.Amazon Redshift with streaming ingestion from Kinesis.
D.Amazon Timestream.
E.Amazon DynamoDB Accelerator (DAX).
AnswersC, D

Supports near-real-time analytics.

Why this answer

Amazon Timestream is purpose-built for time-series data and provides sub-second query latency on streaming data via its dedicated query engine and automatic tiering between in-memory and magnetic stores. Amazon Redshift with streaming ingestion from Kinesis enables real-time analytics by directly consuming Kinesis data streams into Redshift materialized views, allowing sub-second queries on fresh data without batch loading.

Exam trap

The trap here is that candidates often confuse low-latency caching services like DAX or traditional databases with materialized views as suitable for real-time streaming analytics, overlooking that only purpose-built time-series databases or services with native streaming ingestion can guarantee sub-second query latency on continuous data streams.

415
MCQmedium

A database administrator is troubleshooting a slow-performing query on an Amazon RDS for MySQL instance. The slow query log shows the above entry. Based on the exhibit, which index would most improve the query performance?

A.Index on `created_at` only.
B.Index on `status` only.
C.Full-text index on `status` and `created_at`.
D.Composite index on (`status`, `created_at`).
AnswerD

Covers both filter and sort, avoiding a full table scan.

Why this answer

The query filters on `status` and then sorts or filters on `created_at`. A composite index on (`status`, `created_at`) allows MySQL to use the index for both the equality condition on `status` and the range or sort on `created_at`, avoiding a filesort and reducing row scans. This is the most efficient index for this query pattern.

Exam trap

The trap here is that candidates often pick a single-column index on `status` (Option B) thinking it will help the filter, but they overlook the need to also optimize the sort or range on `created_at`, which requires a composite index to avoid a filesort.

How to eliminate wrong answers

Option A is wrong because an index on `created_at` only would not help with the `status` filter, forcing a full table scan or inefficient index scan. Option B is wrong because an index on `status` only would filter by status but then require a separate sort or additional filtering on `created_at`, leading to a filesort and poor performance. Option C is wrong because a full-text index is designed for text search (e.g., MATCH AGAINST) and is not suitable for equality or range comparisons on `status` and `created_at`; it would be ignored by the optimizer for this query.

416
Multi-Selecthard

A company is migrating a large Oracle database to Amazon Aurora PostgreSQL. They need to minimize downtime and validate data consistency after migration. Which THREE steps should they include in their migration plan? (Choose THREE.)

Select 3 answers
A.Create multiple Aurora Replicas for read scaling during migration.
B.Perform a homogeneous migration directly from Oracle to Aurora.
C.Use AWS Database Migration Service (DMS) with ongoing replication to keep the target in sync.
D.Use AWS DMS data validation to compare source and target data.
E.Use AWS Schema Conversion Tool (SCT) to convert the Oracle schema to PostgreSQL.
AnswersC, D, E

Ongoing replication reduces downtime.

Why this answer

Option A (AWS DMS with ongoing replication) minimizes downtime. Option B (Schema Conversion Tool) helps convert Oracle schema to PostgreSQL. Option D (data validation) ensures consistency.

Option C (homogeneous migration) is not needed; DMS works. Option E (Aurora Replicas) is for read scaling, not migration.

417
Multi-Selectmedium

A company is migrating an on-premises MongoDB workload to Amazon DocumentDB. The workload includes aggregation pipelines with $lookup and $group operations. The team wants to ensure minimal performance impact. Which THREE steps should they take?

Select 3 answers
A.Disable journaling to reduce I/O overhead
B.Create appropriate indexes on fields used in $lookup and $group
C.Enable TLS for all connections
D.Use parallel scan operations where possible
E.Choose a larger instance size to accommodate the workload
AnswersB, D, E

Indexes improve aggregation performance significantly.

Why this answer

Option A (enable TLS) is security, not performance. Option B (create indexes) is critical for $lookup and $group. Option C (increase instance size) helps compute-intensive operations.

Option D (disable journaling) is not recommended for durability. Option E (use parallel scans) can speed up aggregations.

418
Multi-Selecthard

Which THREE design patterns are appropriate for improving write performance in Amazon DynamoDB? (Choose 3.)

Select 3 answers
A.Partition data using a high-cardinality partition key
B.Use DynamoDB adaptive capacity to handle uneven access patterns
C.Use DynamoDB Accelerator (DAX) to cache write operations
D.Enable DynamoDB global tables to distribute writes across regions
E.Implement TTL to automatically delete old items
AnswersA, B, C

High cardinality reduces hot partitions and improves throughput.

Why this answer

Options A, C, and D are correct: Using DynamoDB Accelerator (DAX) caches writes, partitioning data helps distribute write load, and using adaptive capacity handles uneven access patterns. Option B is wrong because global tables are for multi-region replication, not write performance. Option E is wrong because TTL is for automatic deletion, not write performance.

419
MCQmedium

A social media startup is designing a database for user activity feeds. Each user follows up to 5,000 other users. The feed must show the latest 100 posts from followed users with latency under 200ms. Reads are 10x writes. Which database design best meets these requirements?

A.Use Amazon RDS for PostgreSQL with read replicas and materialized views refreshed every minute
B.Use Amazon ElastiCache for Redis as a primary data store with sorted sets per user
C.Use a single DynamoDB table with a global secondary index on user_id and timestamp
D.Use Amazon DynamoDB with a fan-out on write pattern, storing each user's feed in a separate partition
AnswerD

Fan-out on write ensures feeds are pre-computed for fast reads, meeting latency and throughput requirements.

Why this answer

Option B is correct because DynamoDB with a fan-out on write pattern pre-joins posts into per-user feed tables, enabling fast reads with low latency. Option A (RDS with read replicas) would struggle with the high write volume and join complexity. Option C (ElastiCache as primary store) loses durability.

Option D (DynamoDB single table with GSI) would require expensive scans to filter followed users' posts.

420
MCQmedium

A financial services company runs a critical application on Amazon RDS for MySQL that processes transactions. The database must maintain ACID compliance and support point-in-time recovery (PITR) with a recovery point objective (RPO) of 5 seconds and recovery time objective (RTO) of 1 minute. The current setup uses a single db.r5.large instance with automated backups enabled (retention period 7 days) and Multi-AZ deployment. During a recent failover test, the failover took 2 minutes, exceeding the RTO. What should the database specialist recommend to meet the RTO requirement?

A.Remove Multi-AZ and rely on automated backups for recovery.
B.Migrate to a Multi-AZ DB Cluster deployment for RDS for MySQL.
C.Configure a cross-Region read replica and promote it during a failure.
D.Increase the instance size to db.r5.xlarge to improve failover speed.
AnswerB

Multi-AZ DB Cluster provides faster failover (<1 minute).

Why this answer

Option C is correct. Amazon RDS Multi-AZ with a Single-AZ deployment failover can be slow; using a Multi-AZ DB Cluster provides faster failover (typically under 1 minute) because it uses synchronous replication to two standby instances. Option A (increase instance size) does not affect failover time.

Option B (use Read Replica for failover) adds complexity and is not automatic. Option D (disable Multi-AZ) would increase failover risk.

421
MCQhard

A developer is configuring IAM permissions for a Lambda function that accesses a DynamoDB table named 'Orders'. The policy shown is attached to the Lambda execution role. The function needs to delete items but only if the item contains only 'order_id' and 'status' attributes. Which statement about this policy is correct?

A.The function can delete any item in the Orders table because the condition is on the resource
B.The function cannot delete any items because the DeleteItem action is not allowed
C.The function cannot call Query on the table because it is not listed in the actions
D.The function can only delete items that contain exactly the attributes 'order_id' and 'status'
AnswerD

The condition ensures only items with those attributes can be deleted.

Why this answer

Option D is correct because the condition restricts DeleteItem to items that have only those attributes. Option A is wrong because the condition is on the delete action, not on the resource. Option B is wrong because the policy does allow DeleteItem with the condition.

Option C is wrong because the function has GetItem and Query permissions.

422
MCQeasy

A company is designing a document storage system using Amazon DynamoDB. Each document is up to 400 KB and is identified by a unique 'document_id'. The access pattern is to retrieve a document by its ID. Which DynamoDB table design is MOST efficient?

A.Use 'document_id' as the partition key and create a GSI on 'document_id'.
B.Use 'document_id' as the primary partition key (only).
C.Store documents in Amazon S3 and use DynamoDB to store metadata with a reference to S3.
D.Use a composite key: partition key 'document_id' and sort key 'version'.
AnswerB

Direct GetItem by partition key is most efficient.

Why this answer

Option B is correct because DynamoDB can store items up to 400 KB in a single table, and using 'document_id' as the sole partition key directly supports the access pattern of retrieving a document by its ID with a single GetItem call, which is the most efficient operation. No secondary index or composite key is needed, as the primary key alone provides O(1) lookup performance for this use case.

Exam trap

The trap here is that candidates often overcomplicate the design by adding GSIs or composite keys, or default to S3 for large objects, when the item size is within DynamoDB's limit and the access pattern is simple key-value lookup.

How to eliminate wrong answers

Option A is wrong because creating a GSI on 'document_id' is redundant and adds unnecessary cost and complexity; the base table already supports direct access by partition key. Option C is wrong because storing documents in S3 with DynamoDB metadata is a valid pattern for items larger than 400 KB, but the question states each document is up to 400 KB, which fits within DynamoDB's item size limit, making the S3 approach less efficient due to additional latency and management overhead. Option D is wrong because using a composite key with a sort key 'version' is unnecessary when the access pattern only requires retrieval by document ID; it adds complexity without benefit and may lead to unintended multiple items per document_id.

423
MCQmedium

A company runs an e-commerce application on Amazon RDS for MySQL. The application experiences read-heavy traffic during flash sales. The development team wants to offload read traffic without changing the application code. Which solution should be used?

A.Implement an Amazon ElastiCache cluster and update the application to cache queries.
B.Configure Multi-AZ deployment for the RDS instance.
C.Create an RDS Read Replica and point read traffic to the replica endpoint.
D.Use DynamoDB Accelerator (DAX) in front of the RDS instance.
AnswerC

Read Replicas offload read traffic without application changes.

Why this answer

Option C is correct because Amazon RDS Read Replicas allow offloading read traffic from the primary DB instance without application changes. Option A is wrong because DynamoDB Accelerator (DAX) is for DynamoDB, not RDS. Option B is wrong because Multi-AZ is for high availability, not read scaling.

Option D is wrong because ElastiCache requires application changes to use caching logic.

424
MCQeasy

A startup is building a mobile app that requires a scalable NoSQL database. The data model includes user profiles with variable attributes that change over time. The database must support high read throughput and low latency. Which AWS database is best suited?

A.Amazon Neptune
B.Amazon RDS for MySQL
C.Amazon DynamoDB
D.Amazon Redshift
AnswerC

NoSQL, flexible schema, high performance at scale.

Why this answer

Amazon DynamoDB is a fully managed NoSQL key-value and document database that delivers single-digit millisecond latency at any scale. It supports flexible schema with variable attributes, making it ideal for user profiles that change over time, and its provisioned or on-demand capacity modes enable high read throughput with consistent low latency.

Exam trap

The trap here is that candidates may confuse Amazon Neptune's graph capabilities with NoSQL flexibility, or assume a relational database like MySQL can handle variable attributes via JSON columns, overlooking DynamoDB's native schema-less design and guaranteed single-digit millisecond performance at scale.

How to eliminate wrong answers

Option A is wrong because Amazon Neptune is a graph database designed for highly connected data (e.g., social networks, fraud detection), not for general-purpose NoSQL workloads with variable attributes. Option B is wrong because Amazon RDS for MySQL is a relational database with a fixed schema, requiring predefined columns and table alterations for attribute changes, which contradicts the variable-attribute requirement. Option D is wrong because Amazon Redshift is a petabyte-scale data warehouse optimized for analytical queries (OLAP), not for high-throughput, low-latency transactional reads (OLTP) on user profiles.

425
MCQhard

A financial services company is migrating an on-premises Oracle database to AWS. The database supports an OLTP application with complex joins, stored procedures, and requires high availability within a single Region. The company wants to minimize licensing costs and use a fully managed service. Which AWS database service should they choose?

A.Amazon DynamoDB
B.Amazon RDS for Oracle
C.AWS Database Migration Service (DMS)
D.Amazon Aurora PostgreSQL-Compatible Edition
AnswerD

Aurora PostgreSQL is fully managed, supports complex joins and stored procedures, and provides high availability with Multi-AZ.

Why this answer

Amazon Aurora PostgreSQL-Compatible Edition is the correct choice because it is a fully managed, high-availability database service that supports complex joins, stored procedures, and OLTP workloads while minimizing licensing costs. Aurora provides built-in replication across three Availability Zones, automatic failover, and up to 15 read replicas, meeting the high availability requirement without the licensing overhead of commercial databases like Oracle.

Exam trap

The trap here is that candidates may choose Amazon RDS for Oracle (Option B) because it supports Oracle features directly, overlooking the explicit requirement to minimize licensing costs and the fact that Aurora PostgreSQL can handle complex joins and stored procedures without Oracle licensing fees.

How to eliminate wrong answers

Option A is wrong because Amazon DynamoDB is a NoSQL key-value and document database that does not support complex joins, stored procedures, or the relational schema required by the existing Oracle OLTP application. Option B is wrong because Amazon RDS for Oracle would require purchasing Oracle licenses (Bring Your Own License or included license), which contradicts the goal of minimizing licensing costs, and it is not the most cost-effective fully managed option for high availability. Option C is wrong because AWS Database Migration Service (DMS) is a migration tool, not a database service; it helps move data to AWS but does not provide the operational database or high availability itself.

426
Multi-Selecthard

A company runs a web application on Amazon EC2 instances behind an Application Load Balancer. The application uses Amazon RDS for MySQL. Recently, the database CPU utilization spikes to 100% during peak hours. The team observes that the spike is caused by a large number of slow queries. They need to identify and resolve the issue with minimal disruption. Which combination of steps should they take? (Choose two.)

Select 2 answers
A.Enable RDS Performance Insights to identify the slow queries
B.Upgrade to a larger instance type
C.Increase the DB instance storage to improve I/O
D.Create a read replica and direct reporting queries to the replica
E.Implement connection pooling using Amazon RDS Proxy
AnswersA, D

Performance Insights provides a dashboard to analyze database performance and identify problematic queries.

Why this answer

Option B: Enabling RDS Performance Insights helps identify the slow queries and their resource consumption. Option D: Creating a read replica for reporting queries offloads read traffic from the primary, reducing CPU load. Option A is not a quick identification step.

Option C is a long-term solution. Option E is not directly helpful for identifying slow queries.

427
Multi-Selecthard

A company is migrating a 2 TB Oracle database to Amazon Aurora MySQL. The database has custom PL/SQL packages and triggers. The migration must be completed with minimal application changes. Which THREE steps should the company take? (Choose three.)

Select 3 answers
A.Use AWS DMS to perform live migration with ongoing replication.
B.Use AWS Schema Conversion Tool (SCT) to convert the schema and code.
C.Use Amazon S3 to store and transfer database dump files.
D.Manually rewrite all PL/SQL packages to MySQL syntax.
E.Test the application thoroughly against the target database.
AnswersA, B, E

DMS minimizes downtime.

Why this answer

AWS DMS supports live migration with ongoing replication, which is essential for migrating a 2 TB Oracle database to Amazon Aurora MySQL with minimal downtime. It can handle continuous changes from the source while the target is being loaded, ensuring near-zero application disruption.

Exam trap

The trap here is that candidates may assume manual rewriting is required for all PL/SQL code, overlooking that SCT automates most of the conversion, or they may choose S3-based dump transfer as a simpler option without considering the need for minimal downtime and ongoing replication.

428
MCQhard

A healthcare company stores patient records in Amazon DynamoDB. Each record includes patient_id (partition key), visit_date (sort key), and a large JSON attribute for medical history. The application frequently queries recent visits for a patient and scans historical data for analytics. The scans on the medical history attribute cause high RCU consumption. The company wants to reduce costs and improve query performance. Which design should be implemented?

A.Compress the medical history attribute using gzip before storing in DynamoDB.
B.Move the medical history attribute to a separate table with patient_id as partition key and visit_date as sort key. Use DynamoDB Streams to keep both tables in sync.
C.Enable DynamoDB Accelerator (DAX) for the table to cache frequent queries.
D.Use Amazon S3 to store the medical history as a separate object and reference it from DynamoDB.
AnswerB

Separating the large attribute reduces RCU consumption for queries that do not need it.

Why this answer

Option B is correct because it separates the large, infrequently accessed medical history attribute from the frequently queried core record, reducing the item size for common queries and thus lowering RCU consumption. By using DynamoDB Streams to synchronize the two tables, you maintain data consistency without adding complexity to the application, and queries against the main table become faster and cheaper since they no longer read the large JSON payload.

Exam trap

The trap here is that candidates often choose compression (Option A) thinking it reduces storage and read costs, but DynamoDB does not natively support compression and charges based on the actual stored item size, so compression must be handled at the application layer and does not reduce RCU consumption.

How to eliminate wrong answers

Option A is wrong because compressing the medical history attribute with gzip before storing it in DynamoDB does not reduce RCU consumption; DynamoDB charges for the actual stored size of the item, and compression is not transparent to read operations—the application would still need to read the compressed data and decompress it, and the item size remains the same from DynamoDB's perspective. Option C is wrong because enabling DAX caches query results but does not reduce the RCU cost of the initial scan or query; DAX is a cache layer that speeds up repeated reads but does not change the fact that scanning the large medical history attribute consumes high RCUs per request. Option D is wrong because while storing medical history in S3 and referencing it from DynamoDB is a valid pattern, it introduces latency for retrieving the history and requires additional application logic to fetch the S3 object; more importantly, it does not address the high RCU consumption from scans on the DynamoDB table itself, as the scans would still need to read the reference attribute (which is small) but the question specifically targets the scans on the medical history attribute causing high RCU consumption.

429
MCQhard

A company runs an OLTP workload on an RDS for MySQL instance. The database has a table with 50 million rows. The application frequently runs queries that join this table with a small lookup table (1000 rows) using a foreign key. The queries are slow. Which design change would most improve performance?

A.Partition the large table by the foreign key column.
B.Scale up the RDS instance to a larger size.
C.Add an index on the foreign key column in the large table.
D.Create a read replica and direct all read queries to it.
AnswerC

An index on the join column allows the database to quickly find matching rows, dramatically improving join performance.

Why this answer

Option D is correct because proper indexing on the join column eliminates full table scans. Option A is wrong because increasing instance size is a vertical scaling approach that may help but is not as effective as indexing. Option B is wrong because read replicas distribute read traffic but do not speed up individual queries.

Option C is wrong because partitioning can help with data management but not necessarily join performance.

430
MCQhard

A financial services company uses Amazon RDS for MySQL with Multi-AZ and read replicas. The application suddenly reports increased write latency. The DB instance is a db.r5.large with 300 GB of General Purpose SSD (gp2) storage. CloudWatch metrics show Write IOPS is at 2,500 and Write Latency averages 50 ms. What is the most likely cause?

A.The read replica is under-provisioned causing replication lag.
B.The gp2 volume has exhausted its I/O credit balance.
C.The Write IOPS has exceeded the gp2 volume's maximum burst IOPS of 3,000.
D.Multi-AZ synchronous replication is causing high latency.
AnswerB

Exhausted credits cause throttling and increased latency.

Why this answer

Option B is correct because gp2 volumes have a baseline of 3 IOPS per GB, so 300 GB provides 900 baseline IOPS, but can burst up to 3,000 IOPS using I/O credits. Sustained 2,500 IOPS may exhaust the credit balance, leading to throttling and increased latency. Option A is wrong because read replicas do not affect primary write latency.

Option C is wrong because Multi-AZ synchronous replication adds minimal latency, typically 1-2 ms. Option D is wrong because 2,500 IOPS is below the burst maximum of 3,000 IOPS for gp2, so the issue is credit exhaustion, not hitting the maximum.

431
MCQhard

A financial services company runs an Amazon Aurora MySQL database. The application performs complex joins and aggregations on large tables, causing high CPU utilization on the writer instance. The team wants to reduce load without changing the application code. Which solution would best address this issue?

A.Create one or more Aurora Replicas and route read traffic to them.
B.Switch to asynchronous replication to reduce load on the primary.
C.Enable Aurora Auto Scaling to increase storage capacity.
D.Migrate to Aurora Serverless v2 for automatic scaling.
AnswerA

Read replicas offload SELECT queries from the writer.

Why this answer

Creating one or more Aurora Replicas and routing read traffic to them offloads the complex joins and aggregations from the writer instance, reducing CPU utilization without requiring application code changes. Aurora Replicas share the same underlying storage volume as the writer, so they serve read queries with minimal replication lag while the writer focuses on write operations.

Exam trap

The trap here is that candidates may confuse scaling compute capacity (Aurora Serverless v2) with offloading read traffic, but only read replicas directly reduce CPU load on the writer by moving read-heavy operations to separate instances.

How to eliminate wrong answers

Option B is wrong because switching to asynchronous replication does not reduce CPU load on the primary; it only changes how data is replicated to replicas, and Aurora already uses asynchronous replication between the writer and replicas. Option C is wrong because Aurora Auto Scaling for storage capacity increases storage automatically but does not offload compute or reduce CPU utilization on the writer instance. Option D is wrong because migrating to Aurora Serverless v2 provides automatic scaling of compute capacity but does not inherently separate read and write workloads; the writer instance would still handle all complex queries, so CPU load would remain high.

432
MCQmedium

A company uses Amazon Redshift for data warehousing. They run a query that joins a large fact table (10 billion rows) with a small dimension table (1 million rows). The query is slow. The distribution style of the fact table is AUTO, and the dimension table has DISTSTYLE ALL. The join key is user_id. What is the MOST likely reason for the poor performance?

A.The dimension table does not have a sort key on user_id
B.The fact table's distribution key is not user_id, causing redistribution
C.The dimension table uses DISTSTYLE ALL, which is inefficient for joins
D.The fact table should have column compression disabled for the join key
AnswerB

AUTO may distribute by another key, leading to large data movement during join.

Why this answer

Redshift distributes data across slices. For joins, distribution keys should align to avoid data redistribution. With DISTSTYLE ALL on the dimension table, it is copied to all nodes, which is good.

The fact table uses AUTO, which may choose a suboptimal distribution key. If the fact table is distributed by user_id, it should be fine. However, the issue may be that the dimension table is not sorted on the join key, or the fact table's distribution key is not user_id.

Option B is wrong because DISTSTYLE ALL is actually beneficial for small tables. Option C is wrong because no sort key on dimension table is less critical. Option D is wrong because column compression helps scan performance but not joins.

433
Multi-Selecthard

A company runs a MySQL-compatible database on Amazon RDS for a mission-critical application. The database experiences high write latency due to frequent index updates. The team wants to redesign the database to reduce write amplification and improve insert performance. Which TWO design changes could help?

Select 2 answers
A.Switch the storage engine from InnoDB to MyISAM
B.Use batch INSERT statements instead of single-row inserts
C.Upgrade to a larger RDS instance class
D.Remove unused or redundant indexes
E.Normalize the database schema to reduce data redundancy
AnswersB, D

Batch inserts reduce transaction overhead and log I/O.

Why this answer

Option A (removing unused indexes) directly reduces write amplification. Option C (batch inserts) reduces per-row overhead. Option B (increasing instance size) may not address root cause.

Option D (changing to InnoDB) is already MySQL's default engine; switching to MyISAM is not recommended. Option E (normalizing) might increase joins but not necessarily reduce write amplification.

434
Multi-Selecthard

A company uses Amazon DynamoDB to store order data. The table has a primary key (OrderID) and a Global Secondary Index (GSI) on CustomerID. The application often queries for all orders of a customer sorted by order date. The GSI projects only the keys. The queries are slow. What should the team do to improve query performance? (Choose two.)

Select 2 answers
A.Enable DynamoDB Accelerator (DAX) for the table
B.Increase the read capacity of the GSI
C.Modify the GSI to include OrderDate as a sort key
D.Use a Local Secondary Index (LSI) instead of a GSI
E.Change the GSI projection to include all attributes
AnswersC, E

Adding OrderDate as a sort key allows the GSI to return items sorted by order date without additional processing.

Why this answer

Option B: Adding a sort key (OrderDate) to the GSI allows sorting natively. Option D: If the GSI projects only keys, each query results in a fetch from the base table (expensive). Changing projection to INCLUDE or ALL avoids the extra fetch.

Option A would increase write costs unnecessarily. Option C may not help if the GSI is inefficient. Option E is not directly related.

435
MCQeasy

A gaming company runs a leaderboard application on Amazon DynamoDB. The application experiences sudden spikes in read traffic during tournaments. The table uses on-demand capacity and the reads are eventually consistent. However, some users report stale data for several seconds. What is the most likely cause?

A.The application is using eventually consistent reads.
B.The table is using on-demand capacity instead of provisioned capacity.
C.The table has a global secondary index (GSI) that is not updated synchronously.
D.The read capacity units are insufficient for the traffic spikes.
AnswerA

Eventually consistent reads can return stale data within about 1 second.

Why this answer

The correct answer is A because eventually consistent reads in DynamoDB can return stale data for up to one second under normal conditions, but during sudden spikes in read traffic, the replication lag can extend to several seconds. The application is using eventually consistent reads, which trade immediate consistency for higher throughput and lower latency, making stale data more likely during high-traffic periods like tournaments.

Exam trap

The trap here is that candidates may confuse eventual consistency with capacity issues, but DynamoDB's on-demand mode eliminates throttling, so stale data points directly to the consistency model rather than resource constraints.

How to eliminate wrong answers

Option B is wrong because on-demand capacity automatically scales to handle traffic spikes without throttling, so it does not cause stale data. Option C is wrong because global secondary indexes (GSIs) are updated synchronously with the base table in DynamoDB, meaning they always reflect the latest write; stale data from a GSI would only occur if the application used eventually consistent reads on the GSI itself. Option D is wrong because read capacity units are not applicable to on-demand capacity mode, which has no fixed capacity limits; insufficient capacity would cause throttling errors (e.g., ProvisionedThroughputExceededException), not stale data.

436
MCQmedium

A company uses Amazon RDS for Oracle with a Multi-AZ deployment for a critical OLTP application. During a recent failover test, they noticed that the application experienced a two-minute downtime. The team wants to reduce downtime to under 30 seconds during automatic failovers. What should they do?

A.Add a read replica to offload reads
B.Reduce the DNS TTL value to 5 seconds
C.Enable Automatic Failover in the RDS console
D.Migrate to Amazon Aurora with Multi-AZ and use the Aurora auto-failover feature
AnswerD

Aurora failover is typically under 30 seconds, and it provides faster recovery than RDS Multi-AZ.

Why this answer

Amazon RDS Multi-AZ failovers typically take 1-2 minutes. To reduce failover times, use Multi-AZ with two readable standbys in RDS for Oracle (if supported) or migrate to Amazon Aurora, which has faster failover (typically under 30 seconds) and also provides read replicas. Option A does not help.

Option B reduces failover detection time but not the failover process itself. Option D is about read replicas, not failover.

437
MCQhard

A gaming company uses Amazon ElastiCache for Redis as a leaderboard for real-time game scores. The leaderboard is updated frequently by millions of users. The application uses sorted sets with player scores. Recently, the leaderboard update latency increased and the cache evictions spiked. The company needs to ensure low-latency updates and high availability. The current setup is a single Redis node. Which design should be implemented?

A.Upgrade to a larger single Redis node instance type to handle the load.
B.Replace Redis with DynamoDB for the leaderboard, using a global secondary index on score.
C.Use a Redis Cluster with multiple shards. Enable AOF persistence and use a read replica for the leaderboard queries.
D.Use ElastiCache for Redis with cluster mode disabled and enable Multi-AZ.
AnswerC

Redis Cluster distributes data across shards, reducing load per node. Read replicas can handle queries, and AOF ensures durability.

Why this answer

Option C is correct because Redis Cluster with multiple shards distributes the write load across shards, reducing per-node pressure and evictions. Enabling AOF persistence ensures durability, while using a read replica for leaderboard queries offloads read traffic from the primary shard, maintaining low-latency updates. This design provides both horizontal scaling and high availability, addressing the increased update latency and eviction spikes.

Exam trap

The trap here is that candidates may assume Multi-AZ (Option D) alone solves high availability and performance, but without sharding (cluster mode enabled), a single node remains a bottleneck for write-heavy workloads, and evictions will continue.

How to eliminate wrong answers

Option A is wrong because upgrading to a larger single Redis node instance type only provides vertical scaling, which has a hard ceiling and does not eliminate the single point of failure or the risk of evictions under sustained high write throughput. Option B is wrong because DynamoDB with a global secondary index on score is not optimized for real-time sorted set operations like ZADD and ZRANGE; it lacks the atomic, in-memory sorted set semantics that Redis provides for leaderboards, leading to higher latency and complexity for frequent updates. Option D is wrong because ElastiCache for Redis with cluster mode disabled and Multi-AZ only provides failover redundancy but does not shard data; a single node still handles all writes, so evictions and latency will persist under high load.

438
MCQhard

A company is designing a social media application that requires storing user relationships (follows) and making graph queries like 'mutual friends.' Which database is most suitable?

A.Amazon ElastiCache for Redis
B.Amazon DynamoDB
C.Amazon Neptune
D.Amazon RDS for MySQL
AnswerC

Neptune is a graph database optimized for highly connected data and graph queries.

Why this answer

Amazon Neptune is a fully managed graph database service optimized for storing and querying highly connected data. It supports both property graph and RDF models, and it uses Gremlin or SPARQL to efficiently traverse relationships like 'mutual friends' in a social media application, making it the ideal choice for graph queries.

Exam trap

The trap here is that candidates often choose DynamoDB for its scalability and low latency, overlooking that graph queries like 'mutual friends' require native graph traversal capabilities that DynamoDB's key-value model cannot efficiently provide.

How to eliminate wrong answers

Option A is wrong because Amazon ElastiCache for Redis is an in-memory key-value store and cache, not a graph database; it lacks native graph traversal capabilities and would require complex application-side logic to compute mutual friends. Option B is wrong because Amazon DynamoDB is a NoSQL key-value and document database that does not support graph queries; it would require multiple queries and client-side joins to resolve relationships, leading to poor performance and scalability for graph workloads. Option D is wrong because Amazon RDS for MySQL is a relational database that uses SQL joins to model relationships, which becomes inefficient and unscalable for deep graph traversals like mutual friends due to the exponential number of join operations required.

439
MCQhard

A company runs a multi-tenant SaaS application on Amazon DynamoDB. Each tenant's data is stored in a separate table named with a tenant-specific prefix (e.g., tenant1_orders, tenant2_orders). The application uses DynamoDB Streams to replicate data to a central analytics table. Recently, the company added a new large tenant that generates 10x more write traffic than any other tenant. The DynamoDB Streams for the large tenant's table is falling behind by several hours, causing stale data in the analytics table. The company has already increased the write capacity of the large tenant's table to 50,000 WCUs, but the streams lag persists. The analytics table is also in DynamoDB and uses a Global Secondary Index (GSI) for querying. The streams processing Lambda function performs simple transformations and writes to the analytics table. The Lambda function is not throttled. Which action would resolve the streams lag?

A.Enable DynamoDB on-demand mode for the large tenant's table to allow automatic scaling of stream shards.
B.Remove the GSI from the analytics table to reduce write amplification.
C.Increase the Lambda function's reserved concurrency to the maximum.
D.Increase the write capacity of the large tenant's table to 100,000 WCUs.
AnswerA

On-demand mode adjusts the number of stream shards based on write traffic, which can help with lag.

Why this answer

Option A is correct because DynamoDB Streams shards are directly tied to the physical partitions of the table. When a table is in provisioned mode, the number of stream shards is fixed and determined by the table's partitions, which cannot scale independently. Enabling on-demand mode allows DynamoDB to automatically split partitions and thus increase the number of stream shards, enabling higher stream throughput to keep up with the large tenant's write volume.

This directly addresses the root cause of the streams lag without requiring manual partition management.

Exam trap

The trap here is that candidates assume increasing write capacity alone will resolve stream lag, but they overlook that stream shard count is tied to physical partitions, which only increase with on-demand mode or by triggering partition splits through sustained high throughput.

How to eliminate wrong answers

Option B is wrong because removing the GSI from the analytics table would reduce write amplification for writes to the analytics table, but the bottleneck is the DynamoDB Streams processing of the large tenant's source table, not the write capacity of the analytics table. Option C is wrong because the Lambda function is not throttled, so increasing reserved concurrency will not help; the issue is that the stream shards cannot process records fast enough due to insufficient shard count. Option D is wrong because increasing write capacity to 100,000 WCUs does not increase the number of stream shards; stream shard count is determined by the number of physical partitions, which only changes when partitions split, and provisioned WCUs alone do not trigger partition splits beyond the initial allocation.

440
MCQmedium

A company is building a real-time chat application that requires storing messages with a maximum of 10,000 characters per message. The application needs sub-millisecond latency for reads and writes. The data must be durable and replicated across three Availability Zones. The development team wants to minimize operational overhead. Which AWS database service is most appropriate?

A.Amazon ElastiCache for Redis with replication
B.Amazon DynamoDB with DAX
C.Amazon RDS for PostgreSQL with Multi-AZ
D.Amazon Aurora MySQL with Multi-AZ
AnswerB

Serverless, sub-millisecond latency, durable, multi-AZ.

Why this answer

Amazon DynamoDB with DAX is the most appropriate choice because it provides single-digit millisecond latency for reads and writes, supports up to 400 KB per item (easily accommodating 10,000 characters), and offers built-in replication across three Availability Zones for durability. DAX (DynamoDB Accelerator) further reduces read latency to sub-millisecond by serving as an in-memory cache, while DynamoDB itself handles write durability and replication automatically, minimizing operational overhead.

Exam trap

The trap here is that candidates often choose ElastiCache for Redis (Option A) because of its sub-millisecond latency, overlooking the requirement for durable, multi-AZ replicated storage that Redis alone does not provide natively without additional configuration and operational overhead.

How to eliminate wrong answers

Option A is wrong because Amazon ElastiCache for Redis is an in-memory data store that does not provide durable storage by default; while it can be configured with replication, it lacks the native multi-AZ durability guarantees required for persistent message storage and would require additional infrastructure for data persistence. Option C is wrong because Amazon RDS for PostgreSQL with Multi-AZ provides high availability but cannot achieve sub-millisecond latency for both reads and writes due to disk-based storage and synchronous replication overhead, and it requires manual scaling and management. Option D is wrong because Amazon Aurora MySQL with Multi-AZ offers better performance than standard RDS but still cannot guarantee sub-millisecond latency for writes due to its distributed storage architecture and replication across three AZs, and it introduces more operational complexity than a fully managed NoSQL solution like DynamoDB.

441
Multi-Selecthard

A company uses Amazon Aurora MySQL for an OLTP application. The database has a buffer pool cache hit ratio of 99%. However, the application still experiences high latency for some queries. Which of the following is the most likely cause? (Choose two.)

Select 2 answers
A.The queries are performing full table scans
B.The buffer pool cache hit ratio is actually low
C.The database instance type is too small for the write workload
D.There is row lock contention on frequently updated tables
E.The read replicas are lagging behind the primary
AnswersA, D

Full table scans can cause high latency even with a high cache hit ratio because they process many rows.

Why this answer

Option A: Even with a high cache hit ratio, queries that scan large amounts of data (e.g., full table scans) can cause high latency due to I/O and CPU. Option D: Row lock contention can cause queries to wait, increasing latency. Option B: Insufficient write capacity is not a problem with Aurora.

Option C: A low cache hit ratio would be an issue, but it's high. Option E: Replica lag affects reads from replicas, not primary.

442
MCQeasy

A company needs to store and analyze log data from thousands of servers. The logs are timestamped and rarely updated. Queries are mostly time-range aggregations. Which database service is best suited for this workload?

A.Amazon CloudWatch Logs
B.Amazon ElastiCache for Redis
C.Amazon DynamoDB
D.Amazon RDS for PostgreSQL
AnswerA

CloudWatch Logs is purpose-built for log ingestion, storage, and analysis.

Why this answer

Option B is correct because Amazon CloudWatch Logs is a managed service for log storage and analysis. Option A (RDS) is not optimized for log data. Option C (DynamoDB) is not designed for log aggregation queries.

Option D (ElastiCache) is an in-memory cache, not persistent log storage.

443
MCQmedium

A company uses Amazon DynamoDB to store IoT sensor data. Each sensor writes a record every second, and the application needs to query the last 24 hours of data for a specific sensor. The query must be very fast. Which table design and query pattern will minimize cost and latency?

A.Use a simple primary key (sensor ID) and scan the table filtering by timestamp
B.Use a composite primary key: partition key = sensor ID, sort key = timestamp
C.Use a composite primary key: partition key = timestamp, sort key = sensor ID
D.Use a simple primary key (sensor ID) and a global secondary index on timestamp
AnswerB

This allows efficient range queries on timestamp for a sensor.

Why this answer

Using a composite primary key with sensor ID as partition key and timestamp as sort key allows efficient querying of latest data with a Query operation on the partition key and a sort key condition. Option B (GSI on timestamp) is wrong because it would be less efficient for querying a specific sensor. Option C (scan) is wrong because it is expensive and slow.

Option D (LSI on timestamp) is wrong because the sort key can be used directly without an LSI.

444
MCQmedium

A team is migrating an on-premises Microsoft SQL Server database to AWS. The database is used for reporting and analytics, with complex queries that join multiple tables. The team wants to minimize application changes and ensure compatibility. Which AWS service should they use?

A.Amazon RDS for SQL Server
B.Amazon RDS for MySQL
C.Amazon Redshift
D.Amazon DynamoDB
AnswerA

RDS for SQL Server offers native compatibility, minimizing migration effort.

Why this answer

Amazon RDS for SQL Server provides native SQL Server compatibility, minimizing application changes. Option B (Amazon RDS for MySQL) is a different database engine requiring SQL dialect changes. Option C (Amazon DynamoDB) is NoSQL and not suited for complex joins.

Option D (Amazon Redshift) is a data warehouse optimized for analytics but requires re-engineering of queries and schema.

← PreviousPage 6 of 6 · 444 questions total

Ready to test yourself?

Try a timed practice session using only Workload-Specific Database Design questions.