Explain DynamoDB partition keys, sort keys, and the importance of access patterns.
AWS · Intermediate level
Answer
DynamoDB partition keys distribute data and traffic; sort keys order related items and support range queries. Good table design starts with access patterns because poor keys cause hot partitions, expensive indexes, and throttling.
Technical explanation
High-cardinality partition keys help avoid hot partitions and uneven throughput.
Database service choice depends on data model, access patterns, consistency requirements, operational burden, scaling model, and failure tolerance.
Managed databases still require customer ownership of schema, indexes, queries, IAM/network security, backups, upgrades, and restore validation.
Production data design should include encryption, private networking, least-privilege access, monitoring, backups, failover testing, and cost controls.
Hands-on example
1. Create the database/cache in private subnets with encryption, least-privilege security groups, backup/retention settings, and monitoring enabled.
2. Run a representative workload test and capture latency, throughput, connection count, CPU, memory, I/O, and errors.
3. Test the failure path: failover, replica lag, cache loss, throttling, or restore depending on the service.
4. Write the operational runbook covering access, backup, scaling, alarms, and rollback.
Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More AWS interview questions
- What is the AWS shared responsibility model, and where is the line between AWS and the customer?
- Explain the difference between a Region, an Availability Zone, and an Edge Location.
- What is a VPC, and what are its core components (subnets, route tables, IGW, NAT)?
- Difference between a public and a private subnet, and how does each reach the internet?
- What is the difference between a Security Group and a Network ACL?
- Are Security Groups stateful or stateless? What about NACLs?
- What is an Internet Gateway versus a NAT Gateway, and when do you need each?
- How does a NAT Gateway differ from a NAT instance?