EC2 • S3 • IAM • VPC • Scaling • RDS & DynamoDB • Lambda • CloudFormation • 2026

AWS Interview Questions

30 questions What each one tests, an answer frame, a spoken answer 34 min read

This page is for developers, DevOps and cloud engineers facing an AWS round, from a first cloud job to a senior platform role. Most AWS interviews start with EC2 and S3, then test IAM and least privilege, VPC networking, load balancers and Auto Scaling, and the choice between RDS and DynamoDB. Later rounds add Lambda limits, CloudWatch, CloudFormation, surviving the loss of an Availability Zone and a small design on the whiteboard. Each question shows what the interviewer is really checking, the shape of a strong answer and a short answer you can say out loud. Practise saying them, then swap in your own stories.

Search all questions by round, difficulty and level, or save the ones you want to practise.

Compute 2 questions

Easy Technical round Fresher, Mid-level Practice question

1. How do you decide which EC2 instance type to run an application on?

What the interviewer is really testing:
Whether you match the instance family to what the workload is actually short of, instead of picking the biggest box you can find.
Answer frame:

Families: general purpose, compute optimized, memory optimized, storage optimized and accelerated with GPUs.

Measure: find the bottleneck first: CPU, memory, disk or network.

Right-size: start small, watch the metrics under real load, then move up or down.

Sample spoken answer:

"I start with what the app is short of. EC2 groups instances into families: general purpose for balanced web and app servers, compute optimized for CPU-heavy work like encoding or batch jobs, memory optimized for caches and in-memory databases, storage optimized for very fast local disk, and accelerated instances with GPUs for machine learning. Inside a family, the size just scales CPU and memory together. Burstable types are fine for small services that idle most of the day but can run out of CPU credits under steady load. I'd also check whether the code runs on ARM, because the Graviton types usually give better value. Then I don't guess for long: I pick a sensible size, load test it, watch CPU and memory in CloudWatch, and right-size from there."

Red flag to avoid:

Picking an instance by name or habit without saying what resource the workload actually needs.

They may ask next:
  • What happens to a burstable instance when it runs out of CPU credits?
  • How would you check whether an instance is oversized?
Say it in 60 seconds
Medium Technical round Fresher, Mid-level, Senior Practice question

2. Walk me through the EC2 pricing models and when you would use each one.

What the interviewer is really testing:
Whether you can match how a workload behaves to the way you pay for it, which is where most compute savings come from.
Answer frame:

On-Demand: pay by the second or hour, no commitment; for new, spiky or short-lived work.

Commitments: Savings Plans or Reserved Instances for the steady baseline you know you'll run for one or three years.

Spot: spare capacity at a deep discount that can be taken back with a two-minute warning; only for work that tolerates interruption.

Dedicated: Dedicated Hosts or Instances for licensing or compliance needs.

Sample spoken answer:

"There are four main ways to pay. On-Demand has no commitment, so it's right for new workloads, spiky traffic, or anything I don't understand yet. Once I know the steady baseline a system always needs, I cover that with a Savings Plan or Reserved Instances, committing for one or three years in exchange for a much lower rate. Savings Plans are the more flexible choice, since a compute plan follows you across instance families and regions. Spot is spare capacity sold cheaply, but AWS can reclaim it with a two-minute notice, so I only use it for stateless or restartable work like batch jobs, CI runners or extra web nodes behind a load balancer. Dedicated Hosts are for when a software licence or a compliance rule needs physical isolation. In practice a good setup mixes them: commitments for the floor, On-Demand and Spot above it."

Red flag to avoid:

Putting a stateful database or a single critical server on Spot, or committing to a long reservation before knowing the real baseline.

They may ask next:
  • How would you design a batch job so it survives Spot interruptions?
  • What is the risk of buying a three-year commitment too early?
Say it in 60 seconds

Storage (S3) 4 questions

Easy Technical round Fresher, Mid-level Practice question

3. What S3 storage classes are there, and how would you move data between them automatically?

What the interviewer is really testing:
Whether you know storage cost depends on how often data is read, and that lifecycle rules do the moving for you.
Answer frame:

Frequent: Standard for data read often; Intelligent-Tiering when the access pattern is unknown.

Infrequent: Standard-IA and One Zone-IA, cheaper to store but with retrieval fees and a minimum storage duration.

Archive: the Glacier classes, from instant retrieval down to Deep Archive that takes hours.

Lifecycle: rules that transition or expire objects by age or prefix.

Sample spoken answer:

"Standard is the default for data that's read often. If I honestly don't know how often something will be read, Intelligent-Tiering moves each object between tiers for me based on access, for a small monitoring charge. For data that's read rarely but must come back fast, like old reports, there's Standard-IA, and One Zone-IA if the data can be recreated, since it lives in one Availability Zone only. Those charge per retrieval and have a minimum storage duration, so they're wrong for short-lived files. Then there are the Glacier classes for archives: Instant Retrieval, Flexible Retrieval that takes minutes to hours, and Deep Archive, the cheapest, where a restore takes hours. To move data automatically I set a lifecycle rule, say logs go to Standard-IA after a month, to Glacier after a quarter, and get deleted after a year."

Red flag to avoid:

Saying cheaper classes are always better, ignoring retrieval fees, minimum durations and restore times.

They may ask next:
  • Why can moving lots of tiny files to an infrequent-access class cost more, not less?
  • How would a lifecycle rule handle old versions in a versioned bucket?
Say it in 60 seconds
Medium Technical round Mid-level, Senior Practice question

4. If I upload a new version of an object to S3 and read it straight away, do I get the new version?

What the interviewer is really testing:
Whether your knowledge of S3 is current, and whether you understand what strong consistency does and does not protect you from.
Answer frame:

Today: S3 gives strong read-after-write consistency for new objects, overwrites, deletes and listings.

History: overwrites and deletes used to be eventually consistent, so older code and advice may still work around it.

Limits: it is not locking; two writers to the same key means the last write wins unless you use conditional writes.

Sample spoken answer:

"Yes. S3 has had strong read-after-write consistency since late 2020, so once a PUT succeeds, any read after it gets the new data, and that covers overwrites, deletes and list operations too. Before that, overwrites and deletes were only eventually consistent, which is why you still see old code with retries or extra databases just to track what's really in a bucket. What strong consistency does not give me is locking. If two processes write the same key at almost the same time, the one that lands last wins and the other write is simply gone. So if I need coordination, like only one worker processing a file, I use a conditional write, which S3 itself now supports with an if-none-match or if-match check, or a lock record in DynamoDB. Turning on versioning also means an overwrite never destroys the older copy."

Red flag to avoid:

Saying S3 is still eventually consistent for overwrites, or assuming strong consistency means S3 handles concurrent writers safely.

They may ask next:
  • How would you stop two workers from processing the same uploaded file?
  • What does versioning change about deletes?
Say it in 60 seconds
Medium Technical round Mid-level, Senior Practice question

5. A bucket holds customer documents. How do you lock it down?

What the interviewer is really testing:
Whether you think in layers: no public path, least-privilege access, encryption, protection from deletion and an audit trail.
Answer frame:

No public path: Block Public Access on, ACLs disabled, no wildcard principals in the bucket policy.

Who gets in: IAM roles with narrow policies, and a bucket policy that enforces HTTPS.

Encryption: encrypted at rest by default; SSE-KMS when you need key control and an audit of key use.

Recovery and audit: versioning, maybe Object Lock, plus CloudTrail data events.

Sample spoken answer:

"I'd go layer by layer. First, make sure nothing is public. New buckets now start with Block Public Access on and ACLs disabled, but I'd confirm both, turn Block Public Access on for the whole account too, and make sure no bucket policy has a wildcard principal. Second, access goes through IAM roles with the smallest set of actions and prefixes each service needs, and I add a bucket policy that denies any request not using HTTPS. Third, encryption. New objects are encrypted at rest by default now, but for customer documents I'd use a KMS key, so key use is logged and I can control who may decrypt. Fourth, protection from mistakes: versioning so an overwrite or delete can be undone, and Object Lock if there's a retention rule. Finally, logging, with CloudTrail data events so I can see who read what. Customers get files through short-lived presigned URLs, never a public link."

Red flag to avoid:

Relying only on the object's name being hard to guess, or making the bucket public so the website can show files.

They may ask next:
  • Why does a KMS key add protection on top of the bucket policy?
  • How would you find out whether any bucket in the account is public today?
Say it in 60 seconds
Medium Coding round Mid-level, Senior Practice question

6. Users need to upload large files from the browser. How would you get them into S3 without passing through your servers?

What the interviewer is really testing:
Whether you know presigned URLs and can keep the backend in control of who uploads what, without exposing credentials.
Answer frame:

Flow: the client asks your API for permission; the API checks the user and returns a presigned PUT URL.

Scope: the URL is tied to one bucket, one key and a short expiry; the key is chosen by the server.

Upload: the browser PUTs straight to S3; an S3 event or a callback tells the backend it arrived.

Sample spoken answer:

"I'd use a presigned URL. The browser calls my API and says it wants to upload a file. The API checks the user is logged in and allowed to, then picks the object key itself, something like the user's ID plus a random name, so nobody can overwrite someone else's file. It signs a PUT URL for that exact key with a short expiry, a few minutes, using the backend's own role. The browser uploads straight to S3 with that URL, so the heavy traffic never touches my servers and no AWS credentials ever reach the client. For very large files I'd use multipart upload with a presigned URL per part. Then I need to know it landed, so either an S3 event triggers processing, or the client tells the API and the API checks the object exists. The bucket also needs a CORS rule that allows the PUT from my site."

Code:
import uuid
import boto3

s3 = boto3.client("s3")

def upload_url(user_id: str) -> dict:
    key = f"uploads/{user_id}/{uuid.uuid4()}.pdf"
    url = s3.generate_presigned_url(
        "put_object",
        Params={"Bucket": "customer-docs", "Key": key,
                "ContentType": "application/pdf"},
        ExpiresIn=300,  # seconds
    )
    return {"url": url, "key": key}
Red flag to avoid:

Letting the client choose any key, or sending long-lived access keys to the browser.

They may ask next:
  • Why can a presigned URL stop working before its expiry time?
  • How would you limit the size of the file a user uploads?
Say it in 60 seconds

IAM & Security 5 questions

Easy Technical round Fresher, Mid-level Practice question

7. What is the difference between an IAM user, a group, a role and a policy?

What the interviewer is really testing:
Whether you understand that roles with temporary credentials are the normal way in, and long-lived user keys are the exception.
Answer frame:

Policy: a JSON document saying which actions are allowed or denied on which resources.

User and group: a user is a long-term identity; a group bundles users to share policies.

Role: an identity with no password or keys of its own that someone or something assumes for temporary credentials.

Sample spoken answer:

"A policy is the rulebook: a JSON document that allows or denies actions, like reading objects in one bucket. On its own it does nothing until it's attached to an identity or a resource. A user is a long-term identity, a person or an old-style application, with a console password or access keys. A group is just a way to attach the same policies to many users, like a developers group. A role is different: it has no permanent credentials. Someone or something assumes it and gets temporary credentials that expire, maybe an EC2 instance, a Lambda function, a user from another account, or a person signing in through single sign-on. These days I'd push almost everything towards roles, because temporary credentials expire on their own, so a leaked one isn't useful for months the way a forgotten access key is."

Red flag to avoid:

Describing a role as just a group of permissions, or creating an IAM user with access keys for every application.

They may ask next:
  • What is a trust policy, and how is it different from a permissions policy?
  • Can you add a role to a group?
Say it in 60 seconds
Easy Technical round Fresher, Mid-level Practice question

8. An application on an EC2 instance needs to read from S3. How should it get credentials?

What the interviewer is really testing:
Whether you avoid hard-coded keys and know how instance roles hand out rotating credentials.
Answer frame:

Role: create an IAM role with read access to that bucket and attach it through an instance profile.

Credentials: the SDK fetches temporary credentials from the instance metadata service and refreshes them.

Hardening: require IMDSv2 and keep the policy narrow.

Sample spoken answer:

"It should never have access keys in the code, a config file or environment variables. I'd create an IAM role whose policy allows reading only the bucket, or the prefix, that the app needs, and attach it to the instance through an instance profile. Then the AWS SDK finds the credentials by itself: it asks the instance metadata service, gets temporary credentials, and refreshes them before they expire, so there's nothing to rotate or leak into a repository. I'd also require IMDSv2 on the instance, because it uses a session token and makes it much harder for a bug like server-side request forgery to steal those credentials. The same idea applies everywhere: Lambda functions get an execution role, and containers get a task role."

Red flag to avoid:

Putting an access key and secret into the application's config, even in a private repository.

They may ask next:
  • Why does IMDSv2 help against server-side request forgery?
  • How would two applications on the same instance get different permissions?
Say it in 60 seconds
Hard Technical round Mid-level, Senior Practice question

9. When several policies apply to one request, how does AWS decide whether to allow it?

What the interviewer is really testing:
Whether you can debug an access-denied error by reasoning through the layers, rather than adding permissions until it works.
Answer frame:

Default: everything is denied unless something allows it.

Explicit deny: a deny in any applicable policy beats every allow.

Ceilings: organization SCPs and RCPs, permission boundaries and session policies only limit; they never grant on their own.

Cross-account: both the caller's identity policy and the resource's policy must allow the action.

Sample spoken answer:

"I think of it as a funnel. It starts from an implicit deny: if nothing allows the action, it fails. Then AWS gathers every policy that applies, meaning identity policies, resource policies like a bucket policy, organization service and resource control policies, permission boundaries and session policies. If any of them has an explicit deny that matches, the answer is deny, full stop, whatever else says allow. The organization policies, boundaries and session policies act as ceilings: they don't grant anything, but the action has to be inside them. Then there must be an allow from an identity or resource policy. Across accounts it's stricter: the caller's own policy and the resource policy on the other side must both allow it. So when I debug an access denied, I check for a deny first, then the ceilings, then whether an allow exists at all."

Red flag to avoid:

Saying the most permissive policy wins, or that an allow can override an explicit deny.

They may ask next:
  • A user has an admin policy but still gets access denied. Where would you look?
  • How is a permission boundary different from an SCP?
Say it in 60 seconds
Medium Coding round Mid-level, Senior Practice question

10. Write an IAM policy that lets a service list and read only the files under one folder of a bucket.

What the interviewer is really testing:
Whether you can write least privilege correctly, including the tricky split between bucket-level and object-level actions.
Answer frame:

Two resources: ListBucket applies to the bucket ARN; GetObject applies to object ARNs.

Prefix: limit listing with a condition on the s3:prefix key.

Nothing extra: no wildcards on actions or buckets.

Sample spoken answer:

"The trap here is that S3 actions work at two levels. Listing is an action on the bucket itself, so s3:ListBucket goes on the bucket ARN, and I restrict it with a condition so the caller can only list keys starting with the reports folder. Reading is an action on objects, so s3:GetObject goes on the object ARN with the folder prefix and a wildcard after it. If I put GetObject on the bucket ARN, or ListBucket on the object path, the policy looks right but doesn't work. I keep the actions explicit, no s3 star, and no other buckets. If the objects were encrypted with a customer-managed KMS key, I'd also need kms:Decrypt on that key, which people often forget."

Code:
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "s3:ListBucket",
      "Resource": "arn:aws:s3:::team-data",
      "Condition": { "StringLike": { "s3:prefix": "reports/*" } }
    },
    {
      "Effect": "Allow",
      "Action": "s3:GetObject",
      "Resource": "arn:aws:s3:::team-data/reports/*"
    }
  ]
}
Red flag to avoid:

Granting s3:* on every resource and calling it temporary.

They may ask next:
  • What would you add if the service also had to write files to that folder?
  • How would you test this policy before giving it to the service?
Say it in 60 seconds
Hard Situational round Mid-level, Senior Practice question

11. You find out an AWS access key was pushed to a public code repository an hour ago. What do you do?

What the interviewer is really testing:
Whether you act in the right order under pressure: contain first, then investigate, then clean up and prevent.
Answer frame:

Contain: deactivate the key immediately; assume it was already used.

Investigate: CloudTrail for every call made with that key ID, across all regions.

Clean up: remove anything the attacker created, rotate what the key could reach, replace the key with a role.

Prevent: secret scanning before code is pushed, and fewer long-lived keys.

Sample spoken answer:

"I'd assume it's already been found, because automated scanners pick up public keys within minutes. So step one is deactivating the key right away, even if something in production uses it. A short outage is better than an attacker with our credentials. Then I'd investigate with CloudTrail, searching every region for calls made with that access key ID, because attackers often launch instances in regions we never use. I'd look for new IAM users, keys or roles they may have created to keep access, and remove them, along with any instances or other resources they started. If the key could read secrets or data, I'd treat those as exposed and rotate them. Deleting the commit isn't enough, since it's already been copied. Afterwards the app gets a role instead of a key, and we add secret scanning so this can't reach a repository again."

Red flag to avoid:

Starting by deleting the commit from the repository and leaving the key active.

They may ask next:
  • Why is rewriting the repository history not enough on its own?
  • How would you check whether the attacker created a way back in?
Say it in 60 seconds

Networking 4 questions

Easy Technical round Fresher, Mid-level Practice question

12. What actually makes a subnet public or private in a VPC?

What the interviewer is really testing:
Whether you know it is the route table, not a setting or a name, that makes a subnet public.
Answer frame:

Public: its route table sends internet traffic to an internet gateway, and instances have public IPs.

Private: no route to the internet gateway; outbound internet, if any, goes through a NAT gateway.

Placement: load balancers in public subnets; app servers and databases in private ones.

Sample spoken answer:

"There's no public checkbox on a subnet. What makes it public is its route table: if it has a route for all internet traffic, 0.0.0.0/0, pointing at an internet gateway, it's public. An instance in it also needs a public or Elastic IP to be reachable. A private subnet has no route to the internet gateway, so nothing on the internet can start a connection to it. If the instances there need to download updates, their route table sends outbound traffic to a NAT gateway sitting in a public subnet. The usual layout is a public and a private subnet in each Availability Zone: the load balancer lives in the public ones, and the app servers and databases live in the private ones, reachable only from the load balancer and each other."

Red flag to avoid:

Saying a subnet is public because of its name, or putting the database in a public subnet for convenience.

They may ask next:
  • Can an instance in a public subnet with no public IP reach the internet?
  • How would you reach a server in a private subnet to debug it?
Say it in 60 seconds
Medium Technical round Fresher, Mid-level, Senior Practice question

13. What is the difference between a security group and a network ACL, and when do you use each?

What the interviewer is really testing:
Whether you understand stateful versus stateless filtering, which explains most of the confusing connectivity bugs people hit.
Answer frame:

Security group: attached to an instance or network interface, stateful, allow rules only.

NACL: attached to a subnet, stateless, allow and deny rules checked in number order.

Use: security groups for almost everything; NACLs as a coarse extra layer, like blocking an address range.

Sample spoken answer:

"A security group sits on the network interface of an instance, a load balancer or a database. It's stateful, so if I allow inbound traffic on port 443, the reply goes back out automatically. It only has allow rules, and a nice feature is that a rule can point at another security group, like the database accepting traffic only from the app servers' group. A network ACL sits at the subnet boundary. It's stateless, so I have to allow the return traffic myself, which usually means opening the ephemeral port range outbound, and that's where people break things. It has both allow and deny rules, evaluated in order by rule number, first match wins. In practice I do almost all my filtering with security groups and use NACLs rarely, for a blunt subnet-wide rule like blocking a known bad range."

Red flag to avoid:

Saying both are stateful, or trying to add a deny rule to a security group.

They may ask next:
  • Inbound port 443 is allowed in the NACL but clients still time out. What did you forget?
  • Why is referencing a security group better than listing IP addresses?
Say it in 60 seconds
Medium Technical round Mid-level, Senior Practice question

14. Why would servers in a private subnet need a NAT gateway, and when would you use a VPC endpoint instead?

What the interviewer is really testing:
Whether you know how private resources reach the outside world, and how to avoid pushing AWS service traffic through NAT.
Answer frame:

NAT gateway: lets private instances start outbound connections while blocking inbound ones.

Resilience: a standard NAT gateway lives in one zone, so run one per Availability Zone, or use a regional NAT gateway that spans zones.

Endpoints: gateway endpoints for S3 and DynamoDB, interface endpoints for other services, so that traffic stays private.

Sample spoken answer:

"Servers in a private subnet still need to reach out now and then, for package updates or a third-party API. A NAT gateway sits in a public subnet and lets them start outbound connections, while nothing from the internet can start a connection back in. A standard NAT gateway lives in one zone, so it's a single point of failure for the others. For production I put one in each Availability Zone with each private route table pointing at its own zone's gateway, or I use the newer regional NAT gateway, which spreads across zones by itself. When the traffic is to AWS services themselves, I'd rather use VPC endpoints. A gateway endpoint for S3 or DynamoDB is just a route table entry and costs nothing extra, and interface endpoints cover services like Secrets Manager. That keeps the traffic off the internet path and cuts NAT data charges."

Red flag to avoid:

Saying a NAT gateway lets the internet reach private servers, or routing heavy S3 traffic through NAT without a second thought.

They may ask next:
  • How would you restrict an S3 gateway endpoint to your own buckets only?
  • What happens to outbound traffic if the only NAT gateway's zone goes down?
Say it in 60 seconds
Medium Situational round Mid-level, Senior Practice question

15. A vendor needs to query your production database, and a teammate suggests moving it to a public subnet. What do you say?

What the interviewer is really testing:
Whether you can push back on an unsafe shortcut and offer workable options, not just a flat no.
Answer frame:

Push back: a public database is exposed to the whole internet's scanning and password guessing.

Better options: a site-to-site VPN, PrivateLink, a read replica, or a narrow API or data export.

Least access: read-only user, only the tables they need, logged, with an end date.

Sample spoken answer:

"I'd say no to the public subnet, but not stop there, because the vendor's need is real. Putting the database in a public subnet exposes it to constant scanning and password guessing, and one weak setting means our customer data is out. Then I'd ask what they actually need. If they need a live connection, a site-to-site VPN or PrivateLink keeps traffic private, and they'd connect to a read replica, never the primary, so their queries can't slow down production. If they only need certain data, an export to a bucket they can read, or a small API, is even safer. Either way they get a read-only database user limited to the tables they need, access is logged, and it has an end date. If time is short, I'd propose the smallest safe version first rather than the quick unsafe one."

Red flag to avoid:

Agreeing to open the database to the internet with only a strong password as protection.

They may ask next:
  • If the vendor can only connect over the internet, how would you limit the risk?
  • How would you make sure the vendor's access is removed when the contract ends?
Say it in 60 seconds

Scaling & Availability 3 questions

Medium Technical round Mid-level, Senior Practice question

16. When would you choose an Application Load Balancer and when a Network Load Balancer?

What the interviewer is really testing:
Whether you know which layer each balancer works at and what that makes possible.
Answer frame:

ALB: layer 7, understands HTTP; routes by path, host or header; ends TLS; good for web apps and APIs.

NLB: layer 4, TCP, UDP and TLS; very high throughput, low latency, static IP per zone.

Shared: both spread targets across zones and run health checks.

Sample spoken answer:

"An Application Load Balancer works at layer 7, so it reads the HTTP request. That lets me route by path or host name, like sending /api to one target group and /images to another, send redirects, terminate TLS with a certificate from Certificate Manager, and put a web application firewall in front. It's my default for websites and HTTP APIs. A Network Load Balancer works at layer 4, so it just forwards TCP or UDP connections without looking inside. I'd pick it for non-HTTP protocols, for extreme throughput with very low latency, when a client needs a fixed IP address per zone to put on an allow list, or when the backend has to see the client's original IP. Both do health checks and spread traffic across Availability Zones, so the choice is really about which layer you need to work at."

Red flag to avoid:

Saying an NLB can route by URL path, or that the two are interchangeable.

They may ask next:
  • How does an ALB health check decide a target is unhealthy?
  • How would a backend behind an ALB find the client's real IP address?
Say it in 60 seconds
Medium Technical round Fresher, Mid-level, Senior Practice question

17. How does an Auto Scaling group work, and how would you set up its scaling policy?

What the interviewer is really testing:
Whether you see Auto Scaling as both self-healing and elasticity, and can pick a sensible policy.
Answer frame:

Pieces: a launch template, minimum, desired and maximum size, and subnets across zones.

Healing: health checks, ideally from the load balancer, replace broken instances.

Policies: target tracking for most cases; step, scheduled and predictive for special ones.

Tuning: instance warm-up and cooldowns so it doesn't flap, and a stateless app so any instance can go.

Sample spoken answer:

"An Auto Scaling group keeps a fleet of identical instances built from a launch template, between a minimum and a maximum, spread across subnets in several Availability Zones. It does two jobs. One is healing: if an instance fails its health check, it's terminated and replaced, and I use the load balancer's health check so an instance that's running but serving errors gets replaced too. The other is elasticity. My default policy is target tracking, where I pick a metric and a target, like average CPU around the middle or a number of requests per instance, and it adds or removes instances to hold it. Scheduled scaling helps when I know the pattern, like a daily morning peak. I also set a warm-up time so a new instance isn't counted before it's ready, and make sure the app is stateless, because any instance can disappear on scale-in."

Red flag to avoid:

Keeping user sessions or uploaded files on the instance's local disk inside an Auto Scaling group.

They may ask next:
  • What would you use a lifecycle hook for?
  • Your group keeps adding and removing instances every few minutes. What would you change?
Say it in 60 seconds
Hard System design round Mid-level, Senior Practice question

18. Design a web application on AWS so it keeps running if an entire Availability Zone goes down.

What the interviewer is really testing:
Whether you remove every single-zone dependency, including the ones people forget, like NAT and state.
Answer frame:

Front: a load balancer across at least two zones, plus a CDN for static content.

App tier: stateless instances in an Auto Scaling group spread over the same zones, with headroom.

Data: a Multi-AZ database, sessions in a shared store, files in S3.

Hidden single points: a NAT gateway per zone (or a regional one), no singleton servers, test by failing a zone.

Sample spoken answer:

"A region has several Availability Zones, each made of one or more separate data centres, so the goal is that no piece lives in only one. At the front, an Application Load Balancer enabled in at least two zones, with CloudFront for static files. Behind it, stateless app servers in an Auto Scaling group spread across those zones, sized so the remaining zones can carry the full load if one disappears. That headroom is what people forget. State moves out of the servers: sessions in ElastiCache or DynamoDB, uploads in S3, and the database on RDS Multi-AZ so a standby in another zone takes over automatically. Then I hunt hidden single points, like one NAT gateway, one cron server or one bastion host, and fix each. Finally I'd test it by taking a zone's instances out of service in staging and watching what breaks."

Red flag to avoid:

Running everything in two zones but with a single NAT gateway, a single database instance or no spare capacity.

They may ask next:
  • What changes if the requirement becomes surviving the loss of a whole region?
  • How much spare capacity would you keep in each zone, and why?
Say it in 60 seconds

Databases 3 questions

Easy Technical round Fresher, Mid-level, Senior Practice question

19. How do you decide between RDS and DynamoDB for a new service?

What the interviewer is really testing:
Whether you choose by access pattern and data shape rather than by hype.
Answer frame:

RDS: managed relational engines; joins, flexible queries, transactions across tables.

DynamoDB: serverless key-value and document store; consistent speed at any scale, but you design around known queries.

Question to ask: do I know my access patterns up front, and do I need ad hoc queries?

Sample spoken answer:

"RDS gives me a managed relational database, like PostgreSQL or MySQL, where AWS handles backups, patching and failover. I'd pick it when the data is relational, I need joins and transactions across tables, and I expect to ask new questions of the data later, like a billing system or an admin dashboard. DynamoDB is a serverless key-value and document store. It gives steady, fast responses at almost any scale with no servers to size, which suits things like user sessions, carts or event data with huge traffic. The catch is I have to design the table around my access patterns up front, because querying by something that isn't a key is awkward or expensive. So my first question is: do I know exactly how I'll read this data? If yes and scale matters, DynamoDB. If the queries will keep changing, RDS."

Red flag to avoid:

Choosing DynamoDB for a data model full of joins and ad hoc reports, or saying NoSQL is always faster.

They may ask next:
  • What would you use if you need a relational database that scales further than a single RDS instance?
  • How would you run reporting queries against data stored in DynamoDB?
Say it in 60 seconds
Medium Technical round Fresher, Mid-level, Senior Practice question

20. What is the difference between RDS Multi-AZ and a read replica?

What the interviewer is really testing:
Whether you can separate high availability from read scaling, a mix-up that causes real outages.
Answer frame:

Multi-AZ: a synchronous standby in another zone for automatic failover; in the classic setup it serves no reads.

Read replica: an asynchronous copy that serves reads; it can lag and must be promoted by hand.

Together: production often uses both, for different reasons.

Sample spoken answer:

"Multi-AZ is about availability. RDS keeps a standby copy in another Availability Zone and writes to it synchronously, so no committed data is lost. If the primary fails, or during some maintenance, RDS fails over to the standby and the endpoint name stays the same, so the app just reconnects. In the classic Multi-AZ setup, the standby doesn't serve any traffic. The newer Multi-AZ cluster option does have readable standbys, but that's a different deployment. A read replica is about scale. It's an asynchronous copy that I can point read-heavy work at, like reports or search pages, and it can even live in another region. Because it's asynchronous it can lag behind, so I wouldn't read from it right after a write that the user expects to see. And it doesn't fail over by itself; I'd have to promote it. For production I usually want Multi-AZ for safety and replicas only if reads are the bottleneck."

Red flag to avoid:

Saying read replicas give you automatic failover, or that the classic Multi-AZ standby helps with read load.

They may ask next:
  • How would your application handle a read replica that is a few seconds behind?
  • What does the application see during a Multi-AZ failover?
Say it in 60 seconds
Hard Technical round Mid-level, Senior Practice question

21. How would you pick the partition key for a DynamoDB table, and how do you avoid a hot partition?

What the interviewer is really testing:
Whether you know DynamoDB performance is decided by key design, and when to reach for a secondary index.
Answer frame:

Access first: list the queries, then design keys that answer them directly.

Spread: a partition key with many distinct values that are used evenly; sort key for ranges within a partition.

Hot keys: add a suffix to split heavy keys, or cache reads.

Indexes: a GSI for a different access pattern; an LSI only at table creation for another sort order.

Sample spoken answer:

"I start from the queries, not the entities. DynamoDB hashes the partition key to decide where an item lives, and each partition has a throughput limit, so I want a key with many distinct values that traffic hits evenly, like a user ID or an order ID. The sort key then lets me fetch ranges inside one partition, like all orders for a customer newest first. A hot partition happens when one key gets far more traffic than the rest, like a date as the key where every write lands on today. Adaptive capacity helps a bit, but the real fix is design: spread writes by adding a random or calculated suffix to the key and reading across the suffixes, or put a cache in front of heavy reads. For a second access pattern, like finding orders by status, I'd add a global secondary index with its own keys."

Red flag to avoid:

Using a low-variety value like status or today's date as the partition key, or relying on Scan with filters for normal queries.

They may ask next:
  • What is the difference between a global and a local secondary index?
  • Why is a Scan usually a warning sign in production code?
Say it in 60 seconds

Serverless 2 questions

Easy Technical round Fresher, Mid-level, Senior Practice question

22. What are the main limits of AWS Lambda, and when is it the wrong choice?

What the interviewer is really testing:
Whether you know the hard limits and the practical ones well enough to say no to Lambda when it doesn't fit.
Answer frame:

Hard limits: 15 minutes maximum per invocation for a standard function; memory up to about 10 GB, and CPU grows with memory.

Concurrency: a regional concurrency quota shared by every function in the account.

Behaviour: cold starts, no state between runs, and connection storms against databases.

Wrong fit: long jobs, steady heavy traffic, or anything needing a persistent connection.

Sample spoken answer:

"The first hard limit is time: a standard function invocation can run for at most 15 minutes. Memory goes up to about 10 GB, and CPU is allocated in proportion, so raising memory is also how you get more CPU. Concurrency is capped by a regional quota that all functions in the account share, so one runaway function can starve the others unless I set reserved concurrency. Then there are the practical limits. A new execution environment has a cold start, which adds latency, especially for heavy runtimes. Nothing survives between runs except by luck, so state goes to S3 or a database. And thousands of concurrent functions can flood a relational database with connections, which is what RDS Proxy is for. So Lambda is wrong for jobs longer than 15 minutes, for steady, heavy traffic that's cheaper on containers, or for anything holding a long-lived connection."

Red flag to avoid:

Saying Lambda scales infinitely with no limits, or planning a long batch job around one invocation.

They may ask next:
  • How would you reduce cold start latency for a user-facing function?
  • A job takes two hours. How would you run it serverless?
Say it in 60 seconds
Medium Coding round Fresher, Mid-level Practice question

23. Write a Lambda function that runs when a file lands in S3 and processes each new object.

What the interviewer is really testing:
Whether you know the shape of the S3 event, the key-encoding trap, and how to avoid an endless trigger loop.
Answer frame:

Event: loop over Records; each holds the bucket name and the object key.

Encoding: keys arrive URL-encoded, so decode them before use.

Safety: create the client outside the handler, write output elsewhere, make processing safe to repeat.

Sample spoken answer:

"The S3 event can carry more than one record, so I loop over Records and pull out the bucket name and the key. The trap is that the key arrives URL-encoded, so a file called my report.csv shows up with a plus sign instead of the space, and I have to decode it or the GetObject call fails. I create the S3 client outside the handler, so a warm environment reuses it. Two more things matter in production. First, I never write the output back into the same bucket and prefix that triggers the function, or it triggers itself in a loop. Second, delivery is at least once, so the same event can arrive twice, and processing should be safe to repeat. If a record keeps failing, I'd send it to a dead-letter queue rather than lose it."

Code:
import urllib.parse
import boto3

s3 = boto3.client("s3")  # reused across warm invocations

def handler(event, context):
    for record in event["Records"]:
        bucket = record["s3"]["bucket"]["name"]
        key = urllib.parse.unquote_plus(record["s3"]["object"]["key"])
        body = s3.get_object(Bucket=bucket, Key=key)["Body"].read()
        result = body.decode("utf-8").upper()
        s3.put_object(Bucket="processed-output", Key=key, Body=result)
    return {"processed": len(event["Records"])}
Red flag to avoid:

Writing results into the same bucket and prefix that triggers the function, creating an endless loop.

They may ask next:
  • What permissions does this function's role need?
  • How would you handle a file too big to read into memory?
Say it in 60 seconds

Operations 4 questions

Easy Technical round Fresher, Mid-level Practice question

24. How would you use CloudWatch to know an EC2-based application is healthy?

What the interviewer is really testing:
Whether you know what CloudWatch gives by default, what it doesn't, and how to turn signals into alerts.
Answer frame:

Metrics: CPU, network and status checks come built in; memory and disk need the CloudWatch agent.

Logs: ship app logs to CloudWatch Logs and search them with Logs Insights.

Alarms: alarms on user-facing signals, like errors and latency, that notify through SNS or trigger scaling.

Sample spoken answer:

"CloudWatch has three parts I'd use together. Metrics: EC2 sends CPU, network and status checks on its own, but not memory or disk usage, because AWS can't see inside the operating system. For those I install the CloudWatch agent, which can also ship log files. Logs: the app's logs go to CloudWatch Logs, and Logs Insights lets me query them when something breaks. Alarms: I'd alarm on what users feel first, like the load balancer's 5xx errors and response time, then on causes like high CPU, a full disk or a failed status check. Alarms send to an SNS topic that pages the on-call person or posts to the team chat, and some can trigger actions like scaling or recovering an instance. A small dashboard with those same numbers helps anyone see health at a glance."

Red flag to avoid:

Assuming memory and disk metrics exist by default, or alerting only on CPU.

They may ask next:
  • Why doesn't EC2 report memory usage by default?
  • How would you avoid an alarm that fires on every short spike?
Say it in 60 seconds
Medium Technical round Fresher, Mid-level, Senior Practice question

25. What is CloudFormation, and how do you change a production stack safely?

What the interviewer is really testing:
Whether you treat infrastructure as reviewed code and know the tools that prevent a template change from deleting data.
Answer frame:

What: a YAML or JSON template describes resources; CloudFormation builds them as one stack.

Safe changes: review a change set first; it shows what will be updated, replaced or deleted.

Protection: DeletionPolicy and UpdateReplacePolicy set to Retain on data, termination protection, drift detection and automatic rollback.

Sample spoken answer:

"CloudFormation is AWS's infrastructure as code. I describe resources in a YAML template, and CloudFormation creates them as a stack, working out the order from the dependencies. Because the template lives in version control, changes get reviewed like application code, and I can build the same environment again for staging. For production, I never apply a change blind. I create a change set, which shows every resource that will be added, modified or deleted, and most importantly anything that will be replaced, because a replaced database or bucket can mean lost data. On stateful resources I set both the deletion policy and the update-replace policy to Retain, so neither deleting nor replacing throws the data away, and I turn on termination protection for the stack. If an update fails halfway, CloudFormation rolls back to the last working state. And I run drift detection now and then to catch anyone changing things by hand in the console."

Code:
AWSTemplateFormatVersion: "2010-09-09"
Resources:
  ReportsBucket:
    Type: AWS::S3::Bucket
    DeletionPolicy: Retain
    UpdateReplacePolicy: Retain
    Properties:
      VersioningConfiguration:
        Status: Enabled
Outputs:
  BucketName:
    Value: !Ref ReportsBucket
Red flag to avoid:

Updating a production stack without looking at what the change will replace or delete.

They may ask next:
  • Which kind of property change makes CloudFormation replace a resource?
  • How would you share a value like a VPC ID between two stacks?
Say it in 60 seconds
Hard System design round Mid-level, Senior Practice question

26. Sketch an AWS architecture for an app where users upload photos and get back resized versions.

What the interviewer is really testing:
Whether you can combine core services into a simple, scalable, secure design and explain each choice.
Answer frame:

Upload: the API hands out presigned URLs; files go straight into an uploads bucket.

Process: an S3 event, ideally through a queue, triggers a Lambda that makes the sizes and writes to a second bucket.

Serve and track: CloudFront in front of the output bucket; metadata in DynamoDB.

Operate: retries and a dead-letter queue, alarms, lifecycle rules, and all of it in a template.

Sample spoken answer:

"I'd keep it serverless because the load is bursty. The client asks an API, API Gateway plus a small Lambda, for an upload URL. That checks the user and returns a presigned PUT for a key it chooses in an uploads bucket. When the file lands, S3 sends an event into an SQS queue, and a Lambda reads from the queue, makes the thumbnail and the medium size, and writes them to a separate output bucket, so it can never trigger itself. The queue gives me retries and a dead-letter queue for images that keep failing. Photo records, like owner, status and sizes, go in DynamoDB keyed by user so the app can list a user's photos fast. Output is served through CloudFront with the bucket kept private. Lifecycle rules clear abandoned uploads, alarms watch the dead-letter queue, and the whole thing is defined in CloudFormation."

Red flag to avoid:

Routing every upload through a single web server's disk, or making the bucket public so photos can be shown.

They may ask next:
  • Why put a queue between S3 and Lambda instead of triggering Lambda directly?
  • How would the user's app find out that the resized photo is ready?
Say it in 60 seconds
Hard Situational round Mid-level, Senior Practice question

27. The AWS bill forecast has jumped sharply since yesterday. How do you find out why?

What the interviewer is really testing:
Whether you can trace cost to a cause methodically, consider a compromise, and put guardrails in place afterwards.
Answer frame:

Narrow down: Cost Explorer by service, then region, usage type and tags, day by day.

Usual suspects: runaway Lambda or scaling, NAT and data transfer, log volume, forgotten resources, or a compromise.

Guardrails: budgets with alerts, anomaly detection, and tags that name an owner.

Sample spoken answer:

"I'd open Cost Explorer with daily granularity and group by service to see what jumped, then drill into region and usage type. That usually points straight at something. A service in a region we don't use, especially lots of big instances, makes me think of a compromised account first, so I'd check CloudTrail straight away. Other common causes I'd look for: a Lambda function triggering itself in a loop, an Auto Scaling group stuck at its maximum, a NAT gateway suddenly carrying heavy traffic because something started pulling data from S3 over the internet path, or debug logging left on and flooding CloudWatch Logs. Tags tell me which team owns it, so I can fix it with them rather than guess. Afterwards I'd set up AWS Budgets alerts and Cost Anomaly Detection, so next time we hear about it in hours, not at the end of the month."

Red flag to avoid:

Waiting for the end-of-month invoice, or shutting random resources down without finding the cause.

They may ask next:
  • How would tagging make this investigation faster next time?
  • What would you do first if it turned out to be crypto-mining instances?
Say it in 60 seconds

Real Work 3 questions

Medium Behavioral round Mid-level, Senior Practice question

28. Tell me about a production issue on AWS that you traced and fixed.

What the interviewer is really testing:
Whether you debug from evidence with AWS tools, own the fix, and leave something behind so it doesn't happen again.
Answer frame:

Situation: the symptom users saw and how you found out.

Evidence: the metrics, logs or traces you checked and what ruled things out.

Fix and follow-up: the immediate fix, the root cause, and the alarm or change that prevents a repeat.

Sample spoken answer:

"At my last company our API started timing out every evening for about twenty minutes. CloudWatch showed the app servers' CPU was fine, but the load balancer's response time spiked at the same moment every day. I pulled the logs for that window in Logs Insights and saw the slow requests were all waiting on database connections. The RDS metrics showed connections hitting the limit exactly when a nightly report job started, because the job opened a fresh connection per row. As a quick fix we moved the job to a read replica, which cleared the timeouts the same day. The real fix was rewriting the job to use a small connection pool. I also added an alarm on database connections so we'd see it coming, and wrote a short note in our runbook. The lesson I took was to line up metrics from each layer on one timeline."

Red flag to avoid:

A story where the fix was restarting servers until it went away, with no root cause and no follow-up.

They may ask next:
  • What would you have done if the logs hadn't pointed anywhere?
  • How did you confirm the fix actually worked?
Say it in 60 seconds
Hard Behavioral round Mid-level, Senior Practice question

29. Tell me about an AWS account you inherited that had a security problem, and how you fixed it without breaking things.

What the interviewer is really testing:
Whether you can tighten security carefully in a live system, using evidence of what's actually used rather than guesswork.
Answer frame:

Finding: what was wrong and how you discovered it.

Evidence: how you learned what the access was really used for before changing it.

Rollout: tighten in steps, with a way back, and prevent it returning.

Sample spoken answer:

"When I joined my last team, the main application ran with an IAM user whose access keys were years old and had full admin rights. Several services and a couple of scripts shared those keys, and nobody was sure which. Revoking them in one go would have taken production down. So I first looked at CloudTrail to see which actions and resources those keys actually used over the past few months, and IAM Access Advisor to see which services were touched. That gave me a real list. I created a separate role for each service with only what it used, moved the services one at a time to their roles, and watched for access denied errors after each move. Once CloudTrail showed no calls on the old keys for two weeks, I deactivated them, waited a bit more, then deleted them. We also added a rule to flag any new long-lived keys."

Red flag to avoid:

Deleting the keys straight away and breaking production, or leaving them alone because changing them felt risky.

They may ask next:
  • How would you have handled it if a service broke after the switch?
  • How did you get the other teams to agree to the change?
Say it in 60 seconds
Medium Behavioral round Mid-level, Senior Practice question

30. Tell me about a time you moved infrastructure that was built by hand in the console into code.

What the interviewer is really testing:
Whether you understand why hand-built infrastructure is a risk and can migrate it without recreating live resources.
Answer frame:

Why: the problem hand-built setup was causing.

How: inventory, template, import existing resources rather than recreate them, verify no changes.

Result: what got easier, and the rule that kept it that way.

Sample spoken answer:

"At my last company the team had a staging environment someone had clicked together in the console two years earlier. When we needed a second copy for a new client, nobody could remember every setting, and the first attempt was missing a security group rule that took a day to find. I offered to put it into CloudFormation. I listed every resource by hand, wrote the template, and then used resource import so the stack adopted the existing VPC, instances and database instead of rebuilding them. Before calling it done, I ran drift detection and a change set to confirm the template matched reality with nothing to change. After that, building the new client's environment took an afternoon from the same template with different parameters. We also agreed that any change goes through the template, and drift detection runs weekly to catch anyone who forgets."

Red flag to avoid:

Deleting and recreating live resources just to get them into a template.

They may ask next:
  • What would you do with a resource that CloudFormation couldn't import?
  • How did you stop people from going back to editing in the console?
Say it in 60 seconds
Were you asked something else? Share it A person checks every question before it goes on the site. No name is shown.
For the call itself

The questions above are the prep. The call has ten more.

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 resume and notes are never stored on our servers. It stays out of screen share on every plan; only you can see it.

Download ClapAssist with 10 free minutes
Mac and Windows · Stays out of screen share · No card