AWS Certified Developer – Associate — All Questions
4 questions
When designing a DynamoDB table, why is choosing a high-cardinality partition key important?
- a.It distributes reads and writes evenly and avoids hot partitions✓
- b.It reduces the cost per gigabyte stored
- c.It enables strongly consistent reads automatically
- d.It removes the need for a sort key
A high-cardinality partition key spreads traffic across many partitions, preventing a single hot partition that would throttle. It does not change storage pricing, does not set consistency (which is chosen per request), and is unrelated to whether a sort key is needed.
A developer must query a DynamoDB table by an attribute that is not the primary key. What should they create?
- a.A DynamoDB Stream
- b.A second table copied nightly
- c.A global secondary index on that attribute✓
- d.A CloudFront distribution
A global secondary index lets you query on a non-key attribute efficiently. Streams emit change events, a nightly copy would be stale and costly, and CloudFront is a content delivery network unrelated to querying items.
An application must guarantee it reads the most recent write immediately after updating an item in DynamoDB. What should it request?
- a.A Scan operation
- b.A strongly consistent read✓
- c.A global secondary index query
- d.A batch write
By default DynamoDB reads are eventually consistent; requesting a strongly consistent read returns the latest committed data. A Scan reads the whole table, a GSI is only eventually consistent, and batch writes are for writing, not reading.
A developer wants separate dev and prod configurations for the same API Gateway API without redeploying different code. Which feature supports this?
- a.A single stage for all environments
- b.Hard-coded backend URLs
- c.One API per environment only
- d.Stages with stage variables✓
API Gateway stages represent deployments such as dev and prod, and stage variables parameterize integrations (for example pointing to different Lambda aliases) without code changes. A single stage or hard-coded URLs cannot separate environments cleanly, and creating entirely separate APIs is unnecessary duplication.