Interview Q&A / AWS & Cloud

INTERVIEW Q&A · 60 QUESTIONS

AWS & Cloud interview questions

EC2, S3, Lambda, IAM and VPC basics, with when to pick which service.

  1. What is the difference between RDS and DynamoDB, and when would you use each?

    RDS is a managed relational database service running engines like MySQL or PostgreSQL, with SQL, joins and transactions. DynamoDB is a serverless key-value and document database that gives fast, predictable performance at very large scale if you design around known access patterns. Use RDS for relational data and flexible queries; use DynamoDB for simple, high-volume lookups by key.

    IntermediateIn-depth4 min read
  2. What is the difference between DynamoDB on-demand and provisioned capacity modes?

    On-demand charges per request and scales automatically, good for unpredictable traffic. Provisioned lets you set read and write capacity units, often cheaper for steady traffic, and can use auto scaling.

    BeginnerQuick answer1 min read
  3. What is the difference between Query and Scan in DynamoDB?

    Query finds items by partition key, optionally narrowing by sort key, and reads only matching items. Scan reads every item in the table or index and filters afterwards, so it is slower and costlier on big tables.

    BeginnerQuick answer1 min read
  4. How do you choose a good partition key in DynamoDB?

    Pick an attribute with many distinct values that requests spread across evenly, such as user ID or order ID. A key where most traffic hits a few values creates a hot partition that gets throttled.

    IntermediateQuick answer1 min read
  5. How many read capacity units does a DynamoDB read use for strongly and eventually consistent reads?

    One RCU covers one strongly consistent read per second of an item up to 4 KB, or two eventually consistent reads. Larger items are rounded up to the next 4 KB.

    AdvancedQuick answer1 min read
  6. What is the difference between a global secondary index and a local secondary index in DynamoDB?

    A GSI has its own partition and sort key and can be added any time, with its own throughput. An LSI keeps the table's partition key with a different sort key, must be created with the table, and shares its capacity.

    AdvancedQuick answer1 min read