AWS interview questions and answers
29 AWS questions from real DevOps and cloud interviews, sorted by seniority: IAM, VPC networking, EC2 and scaling, S3 durability, cost, and the connectivity failures you get asked to debug out loud.
All 29 questions
1
What is the difference between a Region and an Availability Zone?
JuniorA Region is a geographic location with its own isolated set of infrastructure. An Availability Zone is one or more discrete data centres inside a Region, with independent power, cooling and networking.
Region Availability Zone Scope A geography, such as eu-west-1A failure domain inside one, such as eu-west-1aIsolation Almost total. Most services do not replicate across Regions by default Independent power, cooling and network Latency between Tens to hundreds of milliseconds Single-digit milliseconds Used for Data residency, disaster recovery High availability within a Region The consequence worth stating: spreading across AZs is how you survive a data centre failure and it is cheap, whereas spreading across Regions is how you survive a Region failure and it is expensive and complicated. Most designs should do the first and very few need the second.
One detail that catches people out: AZ names are mapped per account, so
eu-west-1ain your account is not necessarily the same physical zone as in someone else's.2
What is an IAM role, and why use one instead of access keys?
JuniorA role is an identity with permissions that no one owns permanently. Something assumes it and receives temporary credentials that expire, typically within an hour.
Access keys are the alternative and the problem: they are long-lived, they have to be stored somewhere, and that somewhere ends up being a config file, an environment variable or a commit. Leaked keys are one of the most common causes of real AWS incidents.
- On EC2, attach an instance profile and the SDK picks up credentials from the metadata service automatically.
- On EKS or ECS, use a service account or task role so each workload gets only what it needs.
- In CI, use OIDC federation so the pipeline exchanges its own identity token for a role, with no stored secret at all.
- Across accounts, let a principal in one account assume a role in the other.
The summary interviewers want: roles remove the thing that gets leaked.
3
What is the difference between a security group and a network ACL in AWS?
JuniorSecurity group Network ACL Attaches to An elastic network interface, so an instance A subnet State Stateful, replies are allowed automatically Stateless, return traffic needs its own rule Rules Allow only Allow and deny Evaluation All rules, any match permits In number order, first match wins Default Deny all inbound, allow all outbound Allow all both ways The stateless half is the practical trap. A NACL that allows inbound on 443 but has no outbound rule for the ephemeral port range will let the request in and drop every reply, which presents as a timeout with a security group that looks perfectly correct.
In practice: use security groups for almost everything, and reach for NACLs only for a coarse subnet-level deny, such as blocking a range.
4
Why is S3 not a filesystem, and why does that matter?
JuniorS3 is an object store with a flat namespace. There are no directories; a key just happens to contain slashes, and the console renders them as folders. Objects are immutable, so "editing" one replaces it in full.
Three consequences:
- No partial writes or appends. You cannot seek into an object and change ten bytes, which is why databases do not live on S3 directly.
- Listing is a query, not a directory read. Listing a prefix with millions of keys is paginated and slow, and there is no cheap "size of this folder".
- Renaming is copy then delete, because a key is part of the object's identity.
The detail worth adding: S3 is strongly consistent for reads after writes, which it has been since December 2020. Claiming it is eventually consistent is a common way to sound out of date.
5
What is the difference between stopping and terminating an EC2 instance?
JuniorStop Terminate The instance Shut down, can be started again Deleted permanently Root EBS volume Kept Deleted, unless DeleteOnTerminationis falseInstance store data Lost Lost Private IP Kept Released Public IP Released, unless it is an Elastic IP Released Billing No instance charge, EBS still charged Nothing Two things interviewers listen for. Instance store is ephemeral and does not survive a stop, which surprises people who think of it as a disk. And a stopped instance still costs money for its volumes, which is why "we stopped it to save money" is only partly true.
6
What is the difference between an IAM user, a group and a role?
JuniorIdentity type Credentials Use for User A person or a legacy application Long-lived password and access keys As few as possible, ideally none Group A collection of users None of its own Attaching policies to many users at once Role An assumable identity Temporary, expiring Applications, services, CI, cross-account access A group is not an identity and cannot be a principal in a policy, which is a detail that gets probed. And the modern answer to "how many users should we have" is close to zero: humans federate through SSO into roles, and workloads assume roles directly.
7
Walk me through a VPC design for a three-tier application.
MidTwo availability zones minimum, and three subnet tiers in each.
What makes a subnet public is its route table, not its name. Note one NAT gateway per zone: sharing one means an availability zone failure takes out the other zone's outbound traffic, and you pay cross-zone transfer the rest of the time. - 1Public subnets, one per AZ, with a route for
0.0.0.0/0to an internet gateway. The load balancer and the NAT gateways live here, and nothing else needs to. - 2Private application subnets, one per AZ, with a route for
0.0.0.0/0to a NAT gateway in the same AZ. The instances or Pods live here and are not reachable from the internet. - 3Private data subnets, one per AZ, usually with no internet route at all. The database lives here and accepts traffic only from the application security group.
Security groups do the real enforcement: the load balancer group allows 443 from anywhere, the application group allows its port from the load balancer's group, and the database group allows its port from the application group. Referencing groups rather than CIDRs means the rules stay correct as instances come and go.
Two senior-sounding details. Put a NAT gateway in each AZ rather than sharing one, or an AZ failure takes out outbound traffic for the others and you pay cross-AZ transfer in normal operation. And use VPC endpoints for S3 and DynamoDB so that traffic skips the NAT gateway entirely, which is both faster and noticeably cheaper.
- 1Public subnets, one per AZ, with a route for
8
How does an EC2 instance in a private subnet reach the internet?
MidThrough a NAT gateway that lives in a public subnet. The private subnet's route table sends
0.0.0.0/0to the NAT gateway; the NAT gateway's own subnet routes0.0.0.0/0to the internet gateway.The NAT gateway lives in the public subnet, not the private one. Putting it in the private subnet is the classic mistake: it then has no route out itself and nothing works. That indirection is the whole answer, and putting the NAT gateway in the private subnet is the classic mistake: it then has no path out itself, and nothing works.
What makes a subnet public or private is only its route table. The name is a convention.
NAT is outbound only, so it lets the instance fetch packages and call APIs while nothing on the internet can initiate a connection to it. If you need inbound, that is a load balancer in the public subnet, not NAT.
Worth mentioning the cost, since it is a common real-world surprise: NAT gateways charge per hour and per gigabyte processed, and a chatty workload pulling images through one can cost more than the instances. VPC endpoints for S3, ECR and DynamoDB remove that traffic.
9
When would you use an ALB, an NLB or CloudFront?
MidLayer Routes on Reach for it when ALB 7, HTTP Host, path, header, method Normal HTTP services, path-based routing, containers NLB 4, TCP and UDP IP and port Extreme throughput, UDP, static IPs, TLS passthrough CloudFront 7, at the edge Cache behaviours and paths Global latency, caching, absorbing traffic near the user The distinguishing details: an ALB gets a DNS name whose IPs change, so it cannot be an allowlist target, whereas an NLB can have a static or Elastic IP per AZ. An NLB preserves the client IP, while an ALB needs
X-Forwarded-For. And CloudFront is not a load balancer, it sits in front of one.The hairpin trap is worth volunteering: a target that reaches the NLB in front of itself hangs, because the source and destination are the same interface. That is the design, not a bug.
10
When would you choose EBS, instance store, EFS or S3?
MidShape Persists a stop Shared Use for EBS Block, one AZ Yes One instance, or a few with multi-attach Boot volumes, databases Instance store Block, on the host No No Scratch, cache, temporary spill EFS NFS filesystem Yes Many instances, across AZs Shared state, lifted legacy apps S3 Object over HTTP Yes Anything with credentials Backups, artefacts, static assets, data lakes The mistake to name is using EFS as a general-purpose disk. It is a network filesystem, so per-operation latency is far higher than EBS, and workloads with many small file operations perform badly on it.
Also worth saying that an EBS volume lives in one AZ, so an EBS-backed instance cannot simply move availability zone. You take a snapshot, which is stored in S3, and restore into the other AZ.
11
How does AWS Auto Scaling actually decide to add an instance?
MidA scaling policy watches a CloudWatch metric and acts on an alarm. Three kinds:
- Target tracking aims at a value, such as 60% average CPU, and AWS works out the rest. This is the right default.
- Step scaling adds a different number of instances depending on how far past the threshold the metric is.
- Scheduled changes capacity by time, for a known daily or weekly pattern.
The parts people miss matter more than the policy type. Health checks: pointing the group at the load balancer's health check rather than just EC2 status means it replaces an instance whose application is broken but whose OS is fine. Warm-up and cooldown: without them the group scales again before the new instance is serving, and oscillates. And the metric has to reflect load: CPU is a poor proxy for an IO-bound service, which may be saturated at 20% CPU, so a request-count or queue-depth target is often better.
Worth adding that scaling out is fast and scaling in is deliberately slow, because a wrong scale-in drops connections.
12
You get an IAM AccessDenied but the policy looks right. How do you debug it?
MidConfirm which identity is actually being used first, because it is often not the one you assumed.
aws sts get-caller-identityThe credential chain picks up environment variables before the profile, so a stale
AWS_ACCESS_KEY_IDexport explains a surprising share of these.aws configure listshows where each value came from.Then ask IAM rather than guessing:
aws iam simulate-principal-policy \ --policy-source-arn arn:aws:iam::123456789012:role/AppRole \ --action-names s3:PutObject \ --resource-arns arn:aws:s3:::acme-uploads/report.pdf \ --query 'EvaluationResults[].[EvalDecision,MatchedStatements[].SourcePolicyId]'implicitDenymeans nothing grants the action, so add it.explicitDenynames the policy doing the blocking, and an explicit deny beats every allow anywhere.If the resource is in another account, check its resource policy too. Cross-account access requires both sides to allow it, and the error looks identical either way.
13
What is the difference between an RDS Multi-AZ deployment and a read replica?
MidMulti-AZ Read replica Purpose Availability Read scaling Replication Synchronous Asynchronous Readable No, on the classic two-instance setup Yes Failover Automatic, DNS moves to the standby Manual promotion Cross-Region No Yes They solve different problems and the question is often a check on whether you conflate them. Multi-AZ gives you no extra read capacity; a read replica gives you no automatic failover, and because replication is asynchronous it can lag, so reading your own write from a replica may not return it.
The detail worth adding: failover is a DNS change on the endpoint, so the application has to reconnect and should not cache the resolved IP. Java's default DNS caching has caused real outages here.
14
How do you make an S3 bucket genuinely private?
MidBlock public access at the account level, and treat everything else as defence in depth.
- 1Turn on S3 Block Public Access, ideally for the whole account. It overrides bucket policies and ACLs, so it is the control that actually holds.
- 2Disable ACLs by setting object ownership to bucket owner enforced. ACLs are legacy and are the mechanism behind most accidental exposure.
- 3Write a least-privilege bucket policy, and consider denying any request where
aws:SecureTransportis false so plaintext HTTP is refused outright. - 4Turn on default encryption, with SSE-S3 or SSE-KMS where you need key-level audit and control.
- 5Serve content through CloudFront with OAC rather than making objects public, which is the normal way to publish static assets while keeping the bucket closed.
Worth naming the real-world failure: buckets are almost never exposed by a subtle policy bug. They are exposed by a legacy ACL, or by someone ticking public to make a demo work.
15
The AWS bill doubled. How do you find out why?
MidLook before changing anything, and go from coarse to fine.
aws ce get-cost-and-usage \ --time-period Start=2026-08-01,End=2026-09-01 \ --granularity MONTHLY --metrics UnblendedCost \ --group-by Type=DIMENSION,Key=SERVICECost Explorer grouped by service tells you where, then grouping by usage type tells you what, which is the step that actually names the cause.
The usual culprits, in rough order of how often they are the answer:
- Data transfer, especially NAT gateway processing and cross-AZ traffic. It hides because it is not attributed to the service that caused it.
- Forgotten resources: unattached EBS volumes, old snapshots, idle load balancers, Elastic IPs that are not associated.
- Storage growth where no lifecycle policy exists, so every log ever written is still in Standard.
- A change in behaviour, such as a retry storm or a new log level, which multiplies request counts rather than resource counts.
The habit worth stating: without cost allocation tags this investigation is guesswork, so tagging is a prerequisite rather than a nice-to-have.
16
What is a Lambda cold start, and when does it actually matter?
MidA cold start is the time to create an execution environment before your code runs: downloading the package, starting the runtime, and running any initialisation outside the handler. Subsequent invocations reuse that environment and skip it.
It matters for user-facing synchronous requests and rarely anywhere else. A queue consumer or a nightly job does not care.
What actually helps, in order:
- Smaller packages and fewer dependencies, since the download is part of the cost.
- Move work out of the handler only if it should be reused, and be aware that anything initialised outside the handler persists between invocations, which is how connection reuse works and also how state leaks between requests.
- More memory, because CPU scales with it, so a larger setting is sometimes both faster and cheaper overall.
- Provisioned concurrency for a known latency requirement, accepting that you now pay for idle capacity and have given up part of the serverless bargain.
Worth mentioning that a VPC-attached Lambda used to add seconds to a cold start. That was largely fixed in 2019, and repeating the old warning dates you.
17
Walk me through how IAM evaluates a request.
SeniorDeny by default, then in this order:
- 1Explicit deny anywhere. Any deny in any applicable policy ends it immediately, and nothing can override it.
- 2Service control policies, if the account is in an Organization. An SCP is a ceiling, not a grant: it can only remove permissions, never add them, and an action missing from an SCP is denied even if the identity policy allows it.
- 3Resource control policies and permission boundaries, which are also ceilings on what can be allowed.
- 4Identity-based policies on the user or role.
- 5Resource-based policies on the resource itself, such as a bucket policy or a KMS key policy.
- 6Session policies, if the credentials came from
AssumeRolewith one attached.
Two consequences that mark a senior answer. Within the same account, an identity policy or a resource policy is enough, so a bucket policy alone can grant access. Across accounts, both sides must allow it, which is why cross-account debugging so often ends at a resource policy nobody thought to check. And a permission boundary on a role means a developer with
iam:*still cannot escalate past it, which is how you delegate IAM safely.18
How would you structure AWS accounts for an organisation, and why?
SeniorMultiple accounts, because the account is AWS's strongest isolation boundary. A mistake in one cannot consume another's quotas, and its blast radius genuinely stops there.
A reasonable baseline:
- A management account that does nothing but hold the Organization. No workloads.
- A security or audit account owning CloudTrail organisation trails, Config, and GuardDuty findings, with read-only access into the rest.
- A shared services account for CI, artefact registries and shared networking.
- One account per environment per workload, so production is isolated from staging rather than separated by a tag or a naming convention.
Then: SCPs at the organisational unit level to deny whole classes of action, such as leaving the Organization or disabling CloudTrail. IAM Identity Center for human access, so people assume roles rather than holding users. And a landing zone, whether Control Tower or your own Terraform, because manually configured accounts drift immediately.
The honest trade: multi-account adds real overhead in networking, DNS and cost visibility, and for a very small team a single account with tight IAM can be the better call. Saying that is worth more than reciting the reference architecture.
19
What breaks in your design when an Availability Zone fails, and when a Region fails?
SeniorTwo very different questions, and conflating them is the trap.
An AZ failure should be a non-event. Instances spread across at least two AZs behind a load balancer, Auto Scaling replacing what it lost, RDS Multi-AZ failing over, and a NAT gateway per AZ so outbound survives. What actually breaks in practice: capacity, because you now need the remaining AZs to absorb everything, so running at 90% utilisation across two AZs means an AZ loss is an outage anyway. And anything single-homed, such as a lone EBS volume or a service pinned to one subnet.
A Region failure is a design decision, not a configuration. Honest options:
Strategy Recovery Cost Backup and restore Hours Lowest Pilot light Tens of minutes Low Warm standby Minutes Moderate Active-active Near zero Highest, and the hardest to operate The senior point: almost nobody needs active-active, and claiming it without having tested a failover is worse than admitting the recovery time. Also worth naming that the global control plane dependencies bite here. IAM, Route 53 and S3 bucket naming are global, and several services have historically had
us-east-1control plane dependencies, which has turned regional incidents into wider ones.20
Where does AWS Lambda stop being cheaper than containers?
SeniorAt sustained, predictable load. Lambda's price per unit of compute is high; what makes it cheap is paying nothing when idle. Remove the idle and the arithmetic inverts.
Roughly: spiky, bursty or low-volume workloads favour Lambda. A service handling steady traffic all day is usually cheaper on containers or reserved instances, and the crossover is often lower than people expect.
The costs that are easy to miss:
- API Gateway frequently costs more than the Lambda behind it, and an ALB or Function URL can be much cheaper at volume.
- Per-request charges compound with chatty architectures, where one user action fans out into many invocations.
- NAT gateway processing for VPC-attached functions.
- Step Functions state transitions, which are billed per transition and add up fast in a loop.
The framing worth offering: the real argument for serverless is usually operational rather than financial, and the honest comparison includes engineering time, not just the bill.
21
How do you handle secrets on AWS?
SeniorNever in code, never in environment variables set from a repository, and never in an AMI.
Secrets Manager SSM Parameter Store Rotation Built in, with Lambda hooks Not built in Cost Per secret per month Free for standard parameters Cross-account Via resource policy Via resource policy on advanced tiers Use for Database credentials, anything rotating Configuration, and secrets on a budget The parts that matter beyond picking a service. Fetch at runtime and cache with a short TTL, so rotation takes effect without a redeploy. Grant per-secret, not
secretsmanager:*, so a compromised workload cannot read everything. Encrypt with a customer-managed KMS key where you need the key policy as a second gate and an audit trail of decryptions.And the answer interviewers most want to hear: prefer no secret at all. IAM roles, RDS IAM authentication and OIDC federation remove the credential rather than protecting it, and you cannot leak what does not exist.
22
When would you use Spot instances, and how do you use them safely?
SeniorWhen the work can be interrupted, and that is a narrower set than the discount tempts you into. Spot is up to about 90% cheaper and can be reclaimed with two minutes of notice.
Good fits: CI runners, batch and data processing, stateless web tiers with enough capacity headroom, and Kubernetes nodes for workloads that tolerate rescheduling. Bad fits: anything holding state locally, long jobs with no checkpointing, and a control plane.
Using it safely:
- Handle the interruption notice. Two minutes is enough to drain connections and checkpoint, and a workload that ignores it will lose work.
- Diversify across instance types and AZs, because capacity is per pool. A single type in a single AZ is the way to get reclaimed constantly.
- Mix with on-demand, so a base of guaranteed capacity carries you when spot dries up.
- Never assume it is available. A spot request can simply not be fulfilled.
Also worth mentioning Savings Plans and reserved capacity as the other lever: for the steady base of a workload they give a meaningful discount with no interruption risk, and the two strategies are complementary rather than alternatives.
23
What are AWS service quotas, and why do they cause production incidents?
SeniorQuotas are per-account, usually per-Region limits on how much of a service you can use. Some are adjustable and some are hard. They cause incidents because they are invisible until you hit one, and the failure arrives as a throttle or a refusal in the middle of something else going wrong.
The pattern is always the same: an incident triggers scaling, scaling hits a quota, and the quota turns a recoverable event into an outage. Classic examples are Elastic IPs per Region, VPCs per Region, running on-demand vCPUs, Lambda concurrent executions, and API rate limits on the control plane.
aws service-quotas list-service-quotas --service-code ec2 \ --query 'Quotas[?Adjustable==`true`].[QuotaName,Value]' --output tableWhat good looks like: know the quotas your scaling path depends on, alarm on utilisation rather than on breach, request increases before you need them since they are not instant, and treat a quota as part of capacity planning. The senior version of the answer mentions that API throttling on the control plane is itself a quota, which is why a retry storm during an incident makes recovery slower.
24
What is the difference between CloudWatch, CloudTrail and Config?
MidService Answers Records CloudWatch Is it healthy and how is it behaving? Metrics, logs, alarms CloudTrail Who did what, and when? API calls against the account Config What did this resource look like on Tuesday? Resource configuration over time They get conflated because all three are described as monitoring. The distinction that matters in an interview is that CloudTrail is your audit and forensic trail, so it belongs in a separate account with the management account unable to delete it, while Config is how you answer compliance and drift questions.
Two practical details. CloudTrail management events are free for the first copy and data events, such as S3 object access, are not, which is why full data event logging on a busy bucket gets expensive. And CloudWatch Logs charges for ingestion, so a debug log level left on in production shows up on the bill before anyone notices it in the logs.
25
How would you deploy a container workload on AWS, and how do you choose?
MidFargate ECS on EC2 EKS You manage Nothing below the task The instances The instances, and Kubernetes itself Learning cost Lowest Low Highest Control Least More Most Right when You want containers and not a cluster You need instance-level control or GPUs You need Kubernetes, or portability The reasoning matters more than the choice. Fargate removes capacity management and is usually right for a small team. ECS on EC2 gives you the host back when you need specialised instances or want to pack tasks densely. EKS is right when the team already knows Kubernetes, when you want an ecosystem of operators, or when portability across clouds is a real requirement rather than an aspiration.
The answer that reads as experience is naming what EKS actually costs: a control plane charge, an upgrade cadence you cannot ignore, and enough Kubernetes knowledge on the team to debug it at three in the morning. Choosing it because it is the default is the mistake.
27
How does Route 53 health checking and failover work?
MidRoute 53 resolves a name, and a routing policy decides what it returns. For availability the relevant ones are:
- Failover: a primary and a secondary record, where the secondary is returned only when the primary's health check fails.
- Latency-based: returns the Region with the lowest latency for that resolver.
- Weighted: splits traffic by proportion, which is how you do a canary across Regions.
- Geolocation: answers by where the query came from, usually for data residency.
The limitation to volunteer is DNS caching. Failover is only as fast as the TTL plus whatever the resolver and the client actually honour, and some clients cache far longer than they should. So DNS failover is measured in minutes, not seconds, and if you need faster you want something in the data path, such as a global accelerator or an active load balancer.
Also worth knowing that a health check on a private endpoint needs a CloudWatch alarm as its source, because Route 53 checks from the public internet.
28
How do S3 storage classes and lifecycle policies actually save money?
SeniorBy matching the class to the access pattern, and the saving comes almost entirely from data that nobody reads any more.
Class Retrieval Good for Standard Immediate Active data Intelligent-Tiering Immediate Unknown or changing patterns Standard-IA Immediate, per-GB retrieval fee Known-infrequent access Glacier Instant Retrieval Milliseconds Archives you still occasionally read Glacier Flexible or Deep Archive Minutes to hours Compliance retention A lifecycle policy then moves objects by age and expires them, which is the part that actually reduces the bill because it stops the bucket growing forever.
The traps worth naming. Transitions cost money per object, so moving millions of tiny objects can cost more than it saves, and there are minimum storage durations, so an object deleted early from Standard-IA is still billed for thirty days. Intelligent-Tiering has a small monitoring charge per object, which makes it a poor fit for very many very small objects. And incomplete multipart uploads accumulate invisibly: they do not appear in a normal listing and they are billed, so a rule to abort them is nearly free money.
29
When would you choose DynamoDB over RDS?
MidWhen the access patterns are known and narrow, and you need them to stay fast at any scale.
DynamoDB RDS Model Key-value and document Relational Queries Only by key and index, designed up front Arbitrary SQL, joins, ad-hoc Scaling Horizontal, effectively unbounded Vertical, plus read replicas Latency Single-digit milliseconds, predictable Good, but degrades with contention Schema changes Trivial A migration The real decision is whether you know your queries. DynamoDB requires you to design the table around the access patterns, and a query nobody planned for means a new index or a scan. RDS lets you ask questions you had not thought of, which is worth a great deal early in a product's life.
The answer that shows experience: most teams reaching for DynamoDB for scale do not have a scale problem, and a relational database with proper indexes handles far more than people assume. Choose DynamoDB for the access pattern and the operational model, not because it sounds more scalable.
Live exercise: an instance cannot be reached, or cannot reach out
The most commonly asked AWS scenario, and it is scored on method rather than on the answer. Work outward from the instance, one layer at a time, and say what each step eliminates.
Is the instance running and healthy, in the subnet you think it is?
aws ec2 describe-instances --instance-ids i-0abc123 --query 'Reservations[].Instances[].[State.Name,SubnetId,PrivateIpAddress,PublicIpAddress]'- yes
- Note whether it has a public IP. An instance in a public subnet with no public IP is unreachable from the internet no matter how the routing is set up.
- no
- Start with the instance itself. A failed status check means it never finished booting, so nothing about the network matters yet.
Does the subnet's route table send traffic where you expect?
aws ec2 describe-route-tables --filters Name=association.subnet-id,Values=subnet-0abc123 --query 'RouteTables[].Routes'- yes
- A
0.0.0.0/0route to an internet gateway makes it a public subnet. A route to a NAT gateway makes it private with outbound access. This is the definition of public and private, not the subnet's name. - no
- No default route means no internet either way. For a private subnet that needs outbound access, the NAT gateway itself has to sit in a public subnet, which is the detail most people miss.
Do the security groups allow it?
aws ec2 describe-security-groups --group-ids sg-0abc123 --query 'SecurityGroups[].[IpPermissions,IpPermissionsEgress]'- yes
- Security groups are stateful, so a permitted inbound request needs no matching outbound rule for its reply. Check the source: a group referencing another group is common and easy to misread.
- no
- Add the specific port and source rather than opening the group. If inbound looks right, remember the default group allows all egress, so a restricted egress rule you inherited can block the reply path.
Do the network ACLs allow it, in both directions?
aws ec2 describe-network-acls --filters Name=association.subnet-id,Values=subnet-0abc123 --query 'NetworkAcls[].Entries'- yes
- NACLs are stateless, so you need an explicit outbound rule for return traffic on the ephemeral port range, roughly 1024 to 65535. This is the single most common cause of "the security group is right and it still times out".
- no
- Rules are evaluated in number order and the first match wins, so a broad deny at a low number will mask an allow you added later.
Is it refused rather than timing out?
nc -zv 10.0.1.20 8080- yes
- Refused means something answered and said no, so the network path is fine. The process is not listening, or is bound to 127.0.0.1 rather than 0.0.0.0.
- no
- A timeout means packets are being dropped silently, which is a security group, a NACL or routing. Go back up the list rather than looking at the application.
What each level is testing
- 1
Junior7 questions
Whether the vocabulary is real. Regions against availability zones, what IAM roles are for, the difference between a security group and a NACL, and why S3 is not a filesystem. Saying the consequence matters more than the definition: not just "roles give temporary credentials" but "so nothing long-lived has to be stored on the instance".
- 2
Mid14 questions
Whether you have built something that stayed up. VPC subnet design and how a private subnet reaches the internet, load balancer choices, scaling policies, EBS against instance store, and how you would debug an instance nobody can reach. Expect to be asked to draw a VPC.
- 3
Senior8 questions
Judgement about cost, blast radius and failure. Multi-account structure, how IAM policy evaluation actually resolves, what a region-wide failure means for your design, where serverless stops being cheaper, and the fact that most real incidents are a permissions or quota problem rather than an outage.
What the round is like
AWS rounds are broad rather than deep, and the breadth is the point: an interviewer wants to know you can place a problem in the right service before you optimise anything. Expect IAM and networking early, because that is where the expensive mistakes live, then a stretch on compute and storage choices, then a scenario. The scenario is almost always connectivity or permissions, and it is asked as a conversation rather than a quiz.
How to prepare with this
- 1Be able to draw a three-tier VPC from memory: two availability zones, public and private subnets, an internet gateway, a NAT gateway, and where the route tables differ. This gets asked constantly and a hesitant answer is very visible.
- 2Learn IAM policy evaluation properly. Explicit deny beats everything, and the order of identity policy, resource policy, permission boundary and SCP is what separates a real answer from a guess.
- 3Practise the connectivity flow below out loud. Narrating a layer at a time, and saying what each check rules out, is the whole skill being tested.
- 4Have real numbers for one thing you made cheaper. "We moved the logs to Glacier Instant Retrieval and saved about 60% on that bucket" lands, and a general claim about right-sizing does not.
- 5Know where your own experience stops and say so. AWS is too large for anyone to know all of it, and an honest boundary followed by how you would find out reads far better than a confident wrong answer.