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 EC2 and Lambda, and when would you pick each?

    EC2 gives you a virtual server that you run and manage, billed while it is running. Lambda runs your function only when an event arrives, scales automatically and bills per request and execution time. Pick Lambda for short, spiky, event-driven work; pick EC2 for long-running, steady or highly customised workloads.

    BeginnerIn-depth4 min read
  2. What are the main limits of AWS Lambda, such as timeout and memory?

    A Lambda function can run for at most 15 minutes per invocation and be given 128 MB to 10,240 MB of memory. CPU power scales with the memory you choose. It also has limits on package size and account concurrency.

    BeginnerQuick answer1 min read
  3. What is a Lambda cold start and how can you reduce it?

    A cold start is the extra delay when Lambda has to create a new execution environment and load your code before running it. Reduce it with smaller packages, lighter runtimes, less work outside the handler, or provisioned concurrency.

    BeginnerQuick answer1 min read
  4. What is RDS Proxy and why would you use it with Lambda?

    RDS Proxy sits between your application and the database and pools connections. It stops many short-lived Lambda functions from opening thousands of connections that exhaust the database, and it speeds up failover handling.

    AdvancedQuick answer1 min read
  5. What is the difference between reserved and provisioned concurrency in Lambda?

    Reserved concurrency sets aside part of your account's concurrency for one function and also caps it. Provisioned concurrency keeps a number of environments pre-initialised so invocations avoid cold starts, and it is billed for the time it is kept ready.

    AdvancedQuick answer1 min read