Interview Q&A / AWS & Cloud
AWS & Cloud interview questions
EC2, S3, Lambda, IAM and VPC basics, with when to pick which service.
Prefer rapid revision? Practise AWS & Cloud short interview answers →
- 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 - How do you read an EC2 instance type name like m5.large or c7g.xlarge?
The letter is the family (m general purpose, c compute, r memory, t burstable), the number is the generation, extra letters mark features such as g for Graviton, and the part after the dot is the size.
BeginnerQuick answer1 min read - What is an AMI and how is it used when launching EC2 instances?
An Amazon Machine Image is a template holding the operating system, installed software and settings used to start an EC2 instance. You can launch many identical instances from one AMI, and copy it across Regions.
BeginnerQuick answer1 min read - What is an Elastic IP address and how is it different from a normal public IP on EC2?
A normal public IP is assigned from AWS's pool and can change when the instance is stopped and started. An Elastic IP is a static public IPv4 address you own in your account until you release it and can remap to another instance.
BeginnerQuick answer1 min read - Why use an IAM role for an EC2 instance instead of storing access keys on it?
A role gives the instance temporary credentials that AWS rotates automatically, so no long-lived secret sits on disk or in code. Access keys can leak through code repos, images or logs and stay valid until someone revokes them.
BeginnerQuick answer1 min read