0%
AWS Developer Associate (DVA-C03) Exam Prep: Development, Security, Testing, Deployment and Troubleshooting
How the Exam Works
Domain 2: Security
Domain 3: Testing and Deployment
Domain 4: Troubleshooting and Optimization
New in DVA-C03: Containers and AI
Final Review and Mock Exams
DynamoDB for Developers
DynamoDB is the database the developer exam assumes you will reach for first. It is a fully managed key value and document store with consistent single digit millisecond latency at almost any scale, no servers to patch and no connection limits to manage. The price of that scale is a different way of thinking about data. You do not normalise into tables and join at query time. You decide which questions the application will ask and design keys so that each question is answered by one cheap request. This section covers tables, items and keys. Later sections cover reading, capacity, safe writes, and streams, TTL and DAX.
Tables, items and attributes
A table is a collection of items. An item is a set of attributes, much like a JSON document, and it can be up to 400 KB including attribute names and values. Attributes have types: strings, numbers, binary, booleans, null, lists, maps and sets of strings, numbers or binary. Apart from the key attributes, items in the same table do not need the same attributes, so one table can hold customers, orders and invoices side by side if the keys keep them apart.
The 400 KB limit matters in exam stems. A requirement to store images, PDFs or large JSON blobs in DynamoDB is answered by storing the object in S3 and keeping its key and metadata in the item. Long attribute names also count against the limit and against capacity on every read and write, which is one reason teams use short names for attributes that appear on millions of items.
Primary keys
Every table has a primary key that uniquely identifies each item, chosen when the table is created and impossible to change afterwards. It takes one of two forms. A simple primary key is just a partition key. A composite primary key is a partition key plus a sort key, and then the combination must be unique, so many items can share a partition key value as long as their sort keys differ.
DynamoDB stores data in partitions, units of storage and throughput that it manages for you. It hashes the partition key value to decide which partition holds an item. All items with the same partition key value live together, ordered by sort key, and together they form an item collection. That ordering is what makes the sort key powerful: you can ask for every order of one customer, or only the orders between two dates, or the latest ten, and DynamoDB reads a contiguous range from a single partition.
Choosing a partition key
A good partition key has high cardinality and spreads requests evenly. User ID, order ID, device ID and session ID are typical choices. A poor partition key concentrates traffic: a status attribute with three values, a date for a table that receives today's writes, or a single tenant that generates most of the load. Each partition has its own throughput ceiling, roughly 3,000 read units and 1,000 write units per second, so all the traffic for one hot key value lands on one partition, and requests are throttled even when the table as a whole has plenty of capacity.
DynamoDB helps with uneven load through adaptive capacity, which shifts throughput toward busy partitions, and by splitting partitions that stay hot. That softens moderate skew. It cannot help a single key value that receives more than one partition can serve. The exam answer for a hot key is to change the key design, for example by adding a random or calculated suffix to the partition key, called write sharding, and reading from all the suffixes when you need the whole set. Another fix is to cache hot reads in front of the table with DAX.
Sort keys and hierarchical data
Because sort keys are compared in order, you can encode hierarchy in them. A sort key such as ORDER#2026-11-03#A17 lets you query all orders with begins_with ORDER#, all orders in November with a between condition on dates, or the most recent order by reading in descending order with a limit of one. Composite sort keys like country#state#city let one query return everything in a state or a city.
Single table design
Many production designs store several entity types in one table, using generic key names such as PK and SK and prefixes in the values. A customer item might have PK CUSTOMER#17 and SK PROFILE, while that customer's orders have PK CUSTOMER#17 and SK ORDER#date#id. One query on PK CUSTOMER#17 returns the profile and recent orders together, which a relational design would need a join for. The exam rarely asks you to build a full single table model, but it does expect you to recognise that DynamoDB is modelled around access patterns, and that a request to join two tables at read time usually means the keys were designed wrongly.
Working with attributes from code
Writes use PutItem to create or replace a whole item, UpdateItem to change some attributes, and DeleteItem to remove one. Reads use GetItem for one item by full primary key. Requests use expressions rather than raw strings of values. An update expression such as SET #st = :s, total = total + :amt describes the change. Expression attribute values, written with a colon prefix, carry the values. Expression attribute names, written with a hash prefix, stand in for attribute names that clash with reserved words such as status, name or date, or that contain dots. A ValidationException mentioning a reserved word is fixed by using an expression attribute name, not by renaming the attribute across the whole table.
A projection expression limits which attributes a read returns. It reduces network transfer and response size, but not read capacity, because capacity is based on the size of the whole item read from storage. That distinction appears in exam distractors that claim a projection expression lowers cost.
Consistency
DynamoDB stores every item in three Availability Zones within a Region. A write is acknowledged once it is durable. A read is eventually consistent by default: it may return data that is a fraction of a second old if it lands on a copy that has not yet received the latest write. A strongly consistent read, requested by setting ConsistentRead to true on GetItem, Query or Scan, always reflects every write acknowledged before it. Strong reads cost twice as much, are not available on global secondary indexes, and across Regions with global tables they need the multi-Region strong consistency mode described below.
Use eventual consistency for most reads, such as product listings or feeds. Use strong reads where a user must see their own just written change, such as reading back an order immediately after checkout, or where a stale read could cause a wrong decision.
Global tables
Global tables replicate a table to several Regions, each accepting reads and writes, with replication usually within about a second. They suit low latency access for users on several continents and Regional disaster recovery. In the default multi-Region eventual consistency mode, conflicting concurrent writes to the same item in two Regions are resolved by last writer wins. Since 2025 a global table can instead be created in multi-Region strong consistency mode, where a strongly consistent read in any Region sees writes acknowledged in any other, at the cost of higher write latency and some feature limits such as no transactions. The exam uses them for multi Region active active designs; it rarely goes deeper for developers.
Exam trap: modelling like a relational database
Stems sometimes describe a design with separate customer, order and product tables and a read path that fetches from all three and combines them in code. That works, but it multiplies requests and latency. The better answer usually stores related items under one partition key so that a single Query returns what the page needs, or denormalises a few attributes, such as the product name, into the order item. Duplicating a small amount of data is normal in DynamoDB, because storage is cheap and reads are what you optimise. When the duplicated value changes, a stream consumer can update the copies in the background.
List the questions the application asks before choosing keys. Each frequent question should be a GetItem or a Query on one partition key, using the sort key for ranges. A design that needs scans or joins for a common question usually has the wrong keys.