AWS interviews for freshers usually check that you can explain the basics in your own words, such as Regions, the shared responsibility model and scaling, and that you have used the services by hand, like launching and fixing an EC2 instance, hosting a site on S3, reading an IAM policy or writing a small Lambda function. Then come questions about what you built in college. It is written for final-year students, new graduates and anyone coming out of an internship, a bootcamp or a first cloud certification who is facing an AWS interview. Each question shows what the interviewer is checking, the shape of a good answer and a short answer to say out loud. Use your own projects.
Search all questions by round, difficulty and level, or save the ones you want to practice.
The spark: one honest reason cloud pulled you in.
Proof: what you actually built or practiced on AWS.
Next step: what you want to learn in this job.
“I got into cloud during my third year when our college project needed to be online for the demo, and I ended up being the one who put it on AWS. I liked that I could build a whole working setup from a laptop, and break it and rebuild it the same afternoon. Since then I've done a few things on my own account: hosted a static portfolio on S3, run a small Flask app on EC2 behind a security group I set up myself, and built a tiny serverless API with Lambda. I also studied for a foundational cloud certification, but honestly the labs taught me more than the exam. In this role I want to learn how real teams run production systems, especially networking and automation, which I've only touched in labs.”
Saying you want cloud because it pays well or is popular, with nothing you have actually built.
The idea: rent computing over the internet, on demand, pay for what you use.
Three layers: who manages what in IaaS, PaaS and SaaS.
AWS examples: one service for each layer.
“Cloud computing means renting servers, storage and databases over the internet instead of buying and running your own hardware. You get them in minutes, pay for what you use, and give them back when you're done. The three models are about how much the provider manages for you. With IaaS, infrastructure as a service, you get raw building blocks like virtual machines and networks, and you manage the operating system and everything on top. EC2 is the classic example. With PaaS, platform as a service, you hand over your code and the platform runs it, so you don't patch servers. Elastic Beanstalk or Lambda fit there. SaaS is finished software you just log into and use, like web email. The further up you go, the less control you have but the less work you do.”
Saying cloud just means 'storing files online', or mixing up which layer EC2 belongs to.
Region: a separate geographic area with its own set of zones.
Availability Zone: one or more data centres with their own power and network, linked by fast connections.
Edge location: a smaller site close to users, used for caching and DNS.
“A Region is a geographic area where AWS has a cluster of data centres, and each Region is independent of the others. Inside a Region there are several Availability Zones. Each zone is one or more data centres with separate power, cooling and networking, placed far enough apart that a fire or flood in one shouldn't hit the others, but close enough that the links between them are very fast. That's why you put copies of your app in two or more zones. Edge locations are different: they're many smaller sites spread around the world that CloudFront and Route 53 use to cache content and answer DNS close to the user. When I pick a Region I think about where my users are, which services are available there, and any rules about where data must be stored.”
Saying a Region and an Availability Zone are the same thing, or that one zone is enough for high availability.
| Vertical | a bigger machine, with a ceiling and usually a restart. |
|---|---|
| Horizontal | more machines sharing the load behind a load balancer. |
Elasticity: adding and removing capacity automatically as demand changes.
“Vertical scaling means making one server bigger, like moving an EC2 instance to a type with more CPU and memory. It's simple, but there's a ceiling, and on EC2 you usually have to stop the instance to change its type, so there's downtime. Horizontal scaling means adding more servers and spreading traffic across them with a load balancer. There's no hard ceiling, and if one server dies the others keep going. The catch is the app should be stateless, so things like login sessions live in a shared store rather than on one server's disk. Elasticity is the cloud part: capacity grows when traffic rises and shrinks when it drops, automatically, so you're not paying for idle machines at night.”
Treating scalability and elasticity as the same word, or missing that vertical scaling hits a limit.
AWS side: security of the cloud, meaning buildings, hardware and the virtualisation layer.
Your side: security in the cloud, meaning data, access, OS and configuration.
It shifts: the more managed the service, the less you own.
“The idea is that AWS secures the cloud itself and I secure what I put in it. AWS looks after the physical data centres, the hardware, the network, and the layer that runs virtual machines. On EC2, everything from the operating system up is mine: patching the OS, which ports I open in the security group, who gets IAM access, encrypting data, and the app code. If I leave SSH open to the whole internet with a weak password, that's on me, not AWS. The line moves with the service. With Lambda, AWS patches the operating system and runtime, so I only own my code, its permissions and the data. With S3, AWS runs the storage, but whether a bucket is public is still my setting.”
Saying AWS is responsible for security so you don't need to worry about it.
Lock root: strong password, MFA, no access keys.
Daily login: a separate admin identity for everyday work.
Safety nets: a budget alert, and CloudTrail turned on.
“The root user can do anything in the account, including closing it, and you can't limit it with IAM policies, so I use it as little as possible. First I give it a long unique password and turn on MFA. I make sure it has no access keys. Then I create a separate identity for daily work, either an admin user in IAM Identity Center or an IAM user with admin rights and its own MFA, and I log in with that from then on. Next I set up a budget with an email alert so a forgotten instance can't surprise me. I'd also make sure CloudTrail is recording, so there's a log of who did what. After that I only log in as root for the few tasks that truly need it.”
Saying you'd just use the root login day to day because it's easier.
Statement one: see every instance.
Statement two: start and stop only instances tagged Env equals dev.
What's missing: nothing else is allowed, so it's denied by default.
“There are two statements, both Allow. The first lets them describe instances on any resource, so they can see every instance in the account in the console or CLI. The second lets them start and stop instances, but the condition says only when the instance has a tag Env with the value dev. So they can start and stop dev machines, but if they try to stop a prod instance, or one with no tag at all, it's refused. They can't terminate anything, launch new instances or change tags, because those actions aren't allowed anywhere, and in IAM anything not allowed is denied by default. That last part matters: since they can't create tags, they can't tag a prod box as dev to get around the rule.”
{
"Version": "2012-10-17",
"Statement": [
{ "Effect": "Allow", "Action": "ec2:DescribeInstances", "Resource": "*" },
{
"Effect": "Allow",
"Action": ["ec2:StartInstances", "ec2:StopInstances"],
"Resource": "arn:aws:ec2:*:*:instance/*",
"Condition": { "StringEquals": { "aws:ResourceTag/Env": "dev" } }
}
]
}
Saying the policy lets them manage all instances, or missing that anything not listed is denied.
Choose: Region, AMI and a small instance type.
Access: a key pair and a security group that allows SSH only from your IP.
Network: a public subnet with a public IP.
Connect: fix key permissions, then SSH with the right user name.
“First I check I'm in the right Region. Then I pick an AMI, say Amazon Linux, and a small general-purpose instance type. I create a key pair and download the private key file, because AWS won't show it again. For the network I use a public subnet with auto-assign public IP turned on, and a security group that allows port 22 from my own IP only, not from everywhere. Storage defaults are fine for a test. After it's running, I copy the public DNS name, lock down the key file's permissions, and SSH in with the right user name. For Amazon Linux it's ec2-user, for Ubuntu it's ubuntu. I've also used EC2 Instance Connect from the console when I didn't have my key with me.”
chmod 400 my-first-key.pem
ssh -i my-first-key.pem ec2-user@ec2-18-200-10-5.eu-west-1.compute.amazonaws.com
# On an Ubuntu AMI the user name is ubuntu instead of ec2-user
Opening SSH to the whole internet by habit, or not knowing why the key file needs strict permissions.
What it is: a script passed at launch that runs on first boot as root.
The script: install, start, enable, write a test page.
Check it: open port 80 and read the boot log if nothing shows.
“User data is a script you give EC2 when you launch an instance. On Linux, cloud-init runs it once on the first boot, as root, so there's no need for sudo. It's handy for installing packages and starting services, so every instance comes up ready without anyone logging in. My script installs the Apache web server, starts it and enables it so it comes back after a reboot, and writes a simple page. For this to work in a browser, the security group needs port 80 open. If the page doesn't load, I SSH in and read the cloud-init output log, which shows each command and any error. In a group project I used this so any teammate could launch an identical server in a couple of minutes.”
#!/bin/bash
# Runs once, as root, on the instance's first boot (Amazon Linux 2023)
dnf install -y httpd
systemctl enable --now httpd
echo "<h1>Hello from my first EC2 web server</h1>" > /var/www/html/index.html
Thinking user data runs on every restart by default, or forgetting the security group rule and blaming the script.
Disk: EBS data stays; instance store data is lost.
IPs: private IP stays, auto-assigned public IP changes.
Fix: an Elastic IP or a DNS name if the address must not change.
“When you stop an EBS-backed instance, the EBS volumes stay, so the OS and my files are still there when it starts. Anything on an instance store disk is lost. The private IP inside the VPC stays the same. The public IP that AWS auto-assigned is released, and I get a new one on start, which is why my SSH command or a bookmarked link suddenly breaks. If I need a fixed public address, I attach an Elastic IP, which stays with the instance across stops. Better still for a real app is putting it behind a load balancer or a DNS name so the address doesn't matter. The instance may also land on different hardware after a start, which is actually a simple fix when the underlying host has a problem.”
Saying nothing changes on stop, or that the public IP always stays the same.
Read the error: a timeout means packets never arrive; 'permission denied' means they do.
The path: public IP, security group rule, route to an internet gateway, network ACL.
Your side: your IP changed, or your network blocks port 22.
“A timeout tells me my packets aren't reaching the instance at all, so it's a network problem, not a key problem. If it said 'permission denied', I'd look at the key file and user name instead. First I check the instance is running and its status checks pass, and that it actually has a public IP. Then the security group: is there an inbound rule for port 22 from my current IP? On college Wi-Fi my IP changes, and that's bitten me before. Next, the subnet's route table needs a route to an internet gateway, otherwise it's a private subnet. Then the network ACL, which might block the traffic. Last, my own network: some campus networks block port 22, so I'd try from my phone's hotspot.”
Rebooting and relaunching at random instead of reading what the error message says.
| EBS | a network disk attached to one instance, in one zone, that outlives a stop. |
|---|---|
| Instance store | a fast local disk that is wiped on stop or terminate. |
| S3 | object storage over an API, not a mounted disk, for files at any scale. |
“EBS is a block storage volume, like a hard disk plugged into the instance over the network. It lives in one Availability Zone, keeps its data when you stop the instance, and you can take snapshots of it. It's what the OS and a database on EC2 normally sit on. Instance store is a disk physically on the host machine. It's very fast, and it survives a reboot, but the data is gone when you stop or terminate the instance, so I'd only use it for cache or scratch files. S3 is not a disk at all. You store whole objects through an API, it scales without limits you'd notice, and it's copied across zones. I'd use it for uploads, backups, logs and static website files.”
Saying instance store keeps data after a stop, or treating S3 as a drive you install software on.
Bucket: upload the files and turn on static website hosting with an index page.
Access: allow public reads with a bucket policy, or keep it private behind CloudFront.
HTTPS and domain: CloudFront with a certificate, Route 53 for the name.
“I'd create a bucket, upload my HTML, CSS and images, and turn on static website hosting with index.html as the index document and an error page. The quick way to make it visible is to turn off Block Public Access for that one bucket and add a bucket policy that allows anyone to read objects. That gives me an S3 website URL, but it's HTTP only. For HTTPS and a custom domain, I'd put CloudFront in front, attach a free certificate from Certificate Manager, and point my domain at CloudFront using Route 53. The cleaner setup keeps the bucket fully private and lets only CloudFront read from it. That's what I did for my portfolio, and it also made the site load faster far from the bucket's Region.”
Making the bucket public and not knowing that the website endpoint does not support HTTPS.
What it does: keeps every version of an object instead of overwriting.
Deletes: a normal delete adds a delete marker; the old versions stay.
Recover and tidy: remove the marker, and expire old versions with a lifecycle rule.
“With versioning on, every time you upload an object with the same key, S3 keeps the old one as a previous version instead of replacing it. When someone deletes a file normally, S3 doesn't really delete it. It adds a delete marker on top, so the file looks gone but the older versions are still there. To get it back, I list the versions, find the delete marker, and delete that marker, and the last real version becomes current again. Or I can copy an older version back over it. Two things to remember: once you turn versioning on you can only suspend it, not fully turn it off, and old versions still take up storage, so I'd add a lifecycle rule to expire them after a while.”
Saying versioning is a backup that costs nothing, or that deleting a file removes every version.
Credentials: set up with aws configure, or better, single sign-on.
Commands: mb, cp, ls, sync under aws s3.
Gotchas: bucket names are unique across everyone; sync only copies changes.
“First the CLI needs credentials. aws configure asks for an access key, secret key and default Region and saves them in a file in my home folder. If my organization uses single sign-on I'd use aws configure sso instead, so there's no long-lived key on my laptop. Then mb makes a bucket, and the name has to be unique across all AWS accounts, not just mine. cp uploads a single file, and the folder is just part of the object key, a prefix. ls lists what's under that prefix. sync compares my local folder with the bucket and only uploads files that are new or changed, which is how I deployed my front end build in my project.”
aws configure # or: aws configure sso
aws s3 mb s3://priya-final-year-project-files # names are unique across all accounts
aws s3 cp report.pdf s3://priya-final-year-project-files/reports/
aws s3 ls s3://priya-final-year-project-files/reports/
aws s3 sync ./build s3://priya-final-year-project-files/site/
Pasting an admin access key into a script or committing the credentials file to a repository.
What a CDN does: keeps copies at edge locations close to users.
Why it's stale: each copy lives until its cache time runs out.
Fixes: an invalidation now, versioned file names for the future.
“CloudFront keeps copies of my files at edge locations near users, so they don't all travel back to the bucket. Each copy is kept for a cache time, set by the cache policy or the Cache-Control headers on the file. Until that time runs out, the edge keeps serving the copy it has, which is why users see the old file. The quick fix is to create an invalidation for that path, which tells the edges to drop their copy and fetch a fresh one. The better long-term fix is to put a version or a hash in the file name, like app.3f9c.js, and update the HTML to point to it. Then a new file is a new URL, so there's nothing stale to clear, and I can keep long cache times.”
Saying CloudFront is broken, or that the only answer is to turn caching off.
The block: /16 fixes the first 16 bits, leaving 65,536 addresses.
Subnets: smaller blocks like /24, each inside one Availability Zone.
The detail: AWS reserves five addresses in every subnet.
“The /16 means the first 16 bits, the 10.0 part, are fixed, and the remaining 16 bits are free, so the VPC has 65,536 addresses, from 10.0.0.0 to 10.0.255.255. Subnets are smaller ranges inside it, and each subnet lives in one Availability Zone. A simple plan is /24 subnets, which gives 256 addresses each: say 10.0.1.0/24 and 10.0.2.0/24 as public subnets in two zones, and 10.0.11.0/24 and 10.0.12.0/24 as private ones. Subnets can't overlap. One thing that surprises people is that AWS reserves five addresses in every subnet, the first four and the last one, so a /24 gives 251 usable addresses. I'd also leave space unused so I can add subnets later without redoing everything.”
Getting the address count wrong by a lot, or putting one subnet across two Availability Zones.
Alerts first: a budget with an email alert, and watch your free usage.
Clean up: terminate, don't just stop, and delete the costly leftovers.
Check everywhere: look at billing by service and by Region.
“Before building anything I set up a budget in AWS Budgets with an email alert at a small amount, and I keep an eye on how much of my free usage is left. Then I build habits. When I finish a lab, I terminate instances rather than just stopping them, because a stopped instance still keeps its EBS volume, and that's billed. I check for the things people forget: unattached Elastic IPs, NAT gateways, load balancers, old snapshots and idle databases. I tag everything with the project name so I can see what belongs to what. And every few days I open the billing page and look by service and by Region, because the classic mistake is launching something in a different Region and never seeing it in the console again.”
Assuming a learning account can't cost anything, with no alert set, and finding out what was left running only when the bill arrives.
| CloudTrail | who did what, when and from where; a record of API calls. |
|---|---|
| CloudWatch | how things are running; metrics, logs and alarms. |
Pick by question: 'who deleted it' versus 'why is it slow'.
“CloudTrail records the actions taken in the account, meaning API calls. Every time someone or something creates, changes or deletes a resource, it logs who it was, when, from which IP and whether it worked. So if an instance disappeared or a security group rule changed, CloudTrail tells me who did it. CloudWatch is about health and performance. It collects metrics like CPU or request counts, stores application logs, and runs alarms that alert me when a number crosses a line. If my app is slow or throwing errors, I open CloudWatch. A simple way I remember it: CloudTrail is the security camera, CloudWatch is the dashboard. They also work together, because you can send CloudTrail logs into CloudWatch and alarm on things like a root login.”
Saying they are the same service, or that CloudWatch tells you who deleted a resource.
RDS handles: setup, patching, backups, restore and failover options.
You still own: schema, queries, indexes, users and network access.
The trade: less control, like no shell on the database host.
“Running MySQL on EC2 means I'm the database admin: installing it, patching the OS and the engine, setting up backups and testing restores, and handling failover if the server dies. RDS does most of that for me. It sets up the database in a few clicks, applies patches in a maintenance window I choose, takes automatic backups so I can restore to a point in time, and can keep a standby in another zone for failover. What I still own is the schema, my queries and indexes, database users, and the security group that decides who can connect. The trade-off is less control: I can't SSH into the host or install whatever I like on it. For a college project or a small team, that trade is almost always worth it.”
Saying RDS removes all database work, including indexing and query tuning.
Handler: a function that takes an event and a context.
Input: query string values come inside the event.
Output: a status code, headers, and a body that is a string.
“With a REST API in API Gateway using proxy integration, the whole HTTP request arrives as the event: the path, headers, query string and body. My handler reads the name from the query string, and if there are no query parameters that field comes through as None, so I default it to an empty dictionary first. The response must be a dictionary with a statusCode, headers and a body, and the body has to be a string, which is why I use json.dumps. Returning a plain dictionary as the body is the classic mistake, and API Gateway answers with a 502 error. The context object gives details like the request ID and the time left, which I'd use for logging. To test it, I'd call the endpoint with a name in the query string.”
import json
def lambda_handler(event, context):
params = event.get("queryStringParameters") or {}
name = params.get("name", "there")
return {
"statusCode": 200,
"headers": {"Content-Type": "application/json"},
"body": json.dumps({"message": "Hello, " + name}),
}
Returning a dictionary as the body instead of a JSON string, or not knowing where the request data sits in the event.
| SQS | a queue; consumers pull, and each message is handled by one of them. |
|---|---|
| SNS | a topic; it pushes each message to every subscriber. |
Together: fan-out, one topic feeding several queues.
“SQS is a queue. A producer drops messages in, they wait there, and a consumer pulls them and deletes each one after processing. If processing fails, the message becomes visible again after a timeout and gets retried. It's great for smoothing out spikes, like resizing images one at a time. SNS is publish-subscribe. You publish to a topic, and SNS pushes a copy to every subscriber straight away: a Lambda function, an email address, an HTTP endpoint or an SQS queue. SNS doesn't hold messages for a consumer to pull later the way a queue does. They combine in fan-out: when an order is placed, I publish once to an SNS topic, and it delivers to separate queues for billing, email and stock, so each one works at its own pace and retries on its own.”
Saying SNS and SQS are the same thing, or that a queue delivers each message to every consumer.
The problem: what the project did and who used it.
The setup: the services and how a request flows through them.
The why: one or two choices you made on purpose.
Looking back: what you would change now.
“My final-year project was an attendance app for our department. The front end was a React build hosted on S3 with CloudFront in front. The API was API Gateway calling Lambda functions in Python, and the data sat in DynamoDB, because our access was simple: look up a student, write an attendance record. I chose serverless mostly because nobody wanted to look after a server during exams, and with almost no traffic at night we weren't paying for idle machines. I wrote the IAM roles so each function could touch only its own table. Looking back, I'd define it all in a template instead of clicking in the console, because rebuilding it for the demo took us a whole evening.”
Listing services with no reason behind them, or describing a tutorial as your own design.
Situation: the team, the account and the early mistake or risk.
What you did: separate identities, limited rights, MFA, alerts.
Result and lesson: what improved and what you'd do from day one.
“In our final-year group of four, we started with one person's account and, honestly, everyone was logging in with the same root password. When one teammate launched a big instance in the wrong Region and forgot it, we only found out from an email. I suggested we fix it. I created a separate login for each person in a group with the permissions we needed for the project, turned on MFA for everyone, and locked the root user away. I added a budget alert that emailed all four of us, and we agreed to tag every resource with the owner's name. After that, when something was left running, we could see whose it was in seconds. The lesson I took is to set up access properly on day one, not after the scare.”
Saying sharing the root password was fine because it was only a college project.
ClapAssist is an AI interview assistant for Mac and Windows. It listens to the interview on your computer and shows you what to say, in short lines you can read while you talk. Your live interview audio and screen are never stored. Your resume and notes are saved to your account so the app fills them in on any computer. It stays out of screen share on every plan, including Free; only you can see it.