Ravindra BagaleCourses & study guides Track your progress

AWS Cloud

Most Asked AWS Interview Questions in MNC Interviews: 27 Frequently Asked Questions Not Covered Elsewhere (with CLI and Code)

This page has 27 AWS questions that are commonly asked in MNC interviews. We read public interview reports and question guides, grouped the questions by theme, and counted how often each theme appeared. Questions that are already answered elsewhere on this site (such as security groups vs NACLs, ALB vs NLB or RTO and RPO) were removed, so this page only has the ones you will not find on our other pages.

1. An everyday example: last year's question papers

Why does this page exist?

Students preparing for exams look at past papers to see which questions come up again and again. Interview preparation works the same way: large service companies and product companies ask a fairly stable set of questions, plus scenario questions based on your projects.

Think of this page as a past-paper collection. The questions are rewritten in our own words, the answers are original, and no person or company is named. The common basics are on the main AWS question pages; this page fills the gaps with practical, hands-on and behavioural questions.

How to use this page

  • Start with the main hub of AWS interview questions, then use this page for the extra, practical questions.
  • Practise the commands and scripts in a test account.
  • All IDs and names are examples, such as account 111122223333.

2. Fresher level questions

Start here if you are a fresher or have less than two years of experience. Try to answer each question aloud first. Then open it and compare.

Q1. Explain how an EC2 instance, a NAT gateway and a network ACL work together in one VPC. Fresher

They do three different jobs, which is why "NAT vs NACL" is a trick question:

  • The EC2 instance sits in a private subnet with no public IP.
  • The NAT gateway sits in a public subnet with an Elastic IP. The private subnet's route table sends 0.0.0.0/0 to it, so the instance can start outbound connections (for example to download patches), but nobody on the internet can start a connection to the instance.
  • The network ACL is a stateless firewall on each subnet. It must allow the outbound request and the return traffic (ephemeral ports 1024-65535) in both directions, or the NAT path breaks even though routes are correct.
  • The security group on the instance is a stateful firewall that adds instance-level rules.

So: NAT is about the route out, NACL and security groups are about what traffic is allowed.

Q2. How many route tables can one subnet use, and should you change the main route table or create a new one? Fresher
  • A subnet is associated with exactly one route table at a time. A route table can serve many subnets.
  • Subnets with no explicit association use the VPC's main route table.
  • Good practice: leave the main route table with only the local route, and create custom route tables (public, private per AZ, isolated) that you associate explicitly. Then a new subnet that someone forgets to associate gets no internet route by accident, which is the safe default.
  • To change routing for one subnet, associate it with a different custom table instead of editing a shared table that other subnets also use.
aws ec2 describe-route-tables --filters Name=association.subnet-id,Values=subnet-0a1b2c3d4e5f67890 --query "RouteTables[].RouteTableId" --output text

Output:

rtb-0123456789abcdef0

This subnet is explicitly associated with route table rtb-0123456789abcdef0. If the output is empty, the subnet uses the main route table.

Q3. What consistency does Amazon S3 give today when you write and then read an object? Fresher

Since December 2020, Amazon S3 gives strong read-after-write consistency for all GET, PUT, LIST and DELETE requests, in all Regions, at no extra cost.

  • After a successful PUT of a new object or an overwrite, any later read returns the new data.
  • LIST results include the object straight after the write.
  • After a DELETE, reads no longer return the object.

Points to remember: there is no locking, so if two clients write the same key at the same time, the last write wins; use conditional writes (If-None-Match or If-Match) if you need to prevent overwrites. Features such as replication to another bucket are still asynchronous.

Q4. What are the minimum and maximum object sizes in Amazon S3, and when must you use multipart upload? Fresher
  • Minimum: an object can be 0 bytes.
  • Maximum: AWS raised the maximum object size from 5 TB to 50 TB in December 2025 (check current limits for your Region and tools).
  • A single PUT request can upload up to 5 GB; larger objects must use multipart upload, and AWS recommends multipart for objects over about 100 MB.
  • Multipart upload allows up to 10,000 parts; each part (except the last) must be at least 5 MiB.

The AWS CLI (aws s3 cp) switches to multipart automatically for large files. Add a lifecycle rule to abort incomplete multipart uploads, because unfinished parts are stored and billed.

Q5. What happens to the EBS volumes of an EC2 instance when the instance is terminated? Fresher

It depends on each volume's DeleteOnTermination flag:

  • Root volume: true by default, so it is deleted with the instance.
  • Other EBS volumes: false by default, so they stay as "available" volumes (and keep costing money) after termination.
aws ec2 describe-instances --instance-ids i-0abc1234def567890 --query "Reservations[].Instances[].BlockDeviceMappings[].[DeviceName,Ebs.DeleteOnTermination]" --output text

Output:

/dev/xvda  True
/dev/xvdf  False

The root volume will be deleted, the data volume will be kept. You can change the flag on a running instance with modify-instance-attribute. Stopping an instance never deletes EBS volumes; instance store data is lost on stop or terminate.

Q6. How do DAS, NAS and SAN storage map to AWS services? Fresher
On-premises ideaMeaningAWS equivalent
DAS (direct-attached storage)Disks inside or attached to one serverInstance store; also EBS as a disk for one instance
SAN (storage area network)Block storage over a network, presented as disksAmazon EBS (block volumes over the AWS network; io2 supports Multi-Attach for clusters)
NAS (network-attached storage)Shared file system over NFS or SMBAmazon EFS (NFS), Amazon FSx (Windows File Server, NetApp ONTAP, Lustre, OpenZFS)
Object storageFiles with metadata through an HTTP APIAmazon S3

This mapping helps when explaining migrations: databases usually move to EBS or managed databases, shared folders to EFS or FSx, archives to S3.

Q7. What is the difference between proactive and reactive scaling, and which AWS scaling options belong to each? Fresher
TypeWhen capacity changesAWS options
Reactive (dynamic)After metrics changeTarget tracking (keep CPU near a target), step scaling, simple scaling
Proactive (planned)Before the load arrivesScheduled scaling (for example scale up at 09:00 IST on weekdays), predictive scaling (uses past daily and weekly patterns to forecast)

When to pick which: use target tracking for most workloads; add scheduled scaling for known events (sales, office hours, batch windows); add predictive scaling when traffic has a regular pattern and instances take minutes to become ready. Vertical scaling (bigger instance) is another kind, but it usually needs a restart.

Q8. What are the different ways to create an Amazon EKS cluster? Fresher
  • AWS Management Console: good for learning.
  • eksctl: a command-line tool that creates the cluster, node groups and networking in one command or from a YAML file.
eksctl create cluster --name demo --region ap-south-1 --nodegroup-name ng-1 --node-type t3.medium --nodes 2
  • AWS CLI (aws eks create-cluster) plus separate node group commands: full control, more steps.
  • Infrastructure as code: Terraform (often with the community EKS module), AWS CloudFormation or AWS CDK, which is the usual choice for production because it is repeatable and reviewed.
  • EKS Auto Mode can be turned on with any of these to let AWS manage nodes and core add-ons.

In interviews, say which one you used and why (for example Terraform for repeatable environments).

Q9. Write a small boto3 script that prints the ID and state of every EC2 instance in a Region. Fresher
import boto3, sys
region = sys.argv[1] if len(sys.argv) > 1 else "ap-south-1"
ec2 = boto3.client("ec2", region_name=region)
for page in ec2.get_paginator("describe_instances").paginate():
    for res in page["Reservations"]:
        for inst in res["Instances"]:
            print(inst["InstanceId"], inst["State"]["Name"])

Output:

i-0abc1234def567890 running
i-0fed9876cba543210 stopped

The script uses a paginator so it works with many instances, and takes the Region as an argument. Credentials come from the usual chain (role, profile or environment), never from the code.

Q10. How do you start an AWS CodePipeline run from a script with the pipeline name as an argument? Fresher

CLI:

aws codepipeline start-pipeline-execution --name orders-api-pipeline

Output:

{"pipelineExecutionId": "3137f7cb-7cf7-4e2b-9d3a-111122223333"}

Python:

import boto3, sys
cp = boto3.client("codepipeline")
resp = cp.start_pipeline_execution(name=sys.argv[1])
print("Started:", resp["pipelineExecutionId"])

A new run starts with the latest source revision. Check progress with get-pipeline-execution or list-pipeline-executions. The caller needs codepipeline:StartPipelineExecution on that pipeline.

Q11. How do you keep up with AWS changes when new services and features launch every month? Fresher

Give a real habit, for example:

  • Read the AWS What's New feed or weekly summaries for the services you run, and the "service availability change" notices.
  • Follow the release notes and roadmaps of tools you use (Terraform provider, EKS versions, Lambda runtimes).
  • Try one new feature in a sandbox account each month, and share a short write-up with the team.
  • Track deprecations in a list with dates (for example runtime end of support, EKS version end of standard support, services closed to new customers).

Interviewers like hearing how you turned a new feature into a real improvement, such as moving to gp3 or Graviton.

3. Mid level questions

These questions check how you use the service in real projects. Interviewers expect the why, the how and one real example.

Q12. How do you let a CI/CD pipeline pull images from only one ECR repository? Mid level

Give the pipeline role a policy scoped to that repository:

aws iam put-role-policy --role-name ci-deploy --policy-name ecr-pull-orders --policy-document file://ecr-pull-orders.json

The policy file allows ecr:GetAuthorizationToken on "*" (this action has no resource level), and ecr:BatchGetImage, ecr:GetDownloadUrlForLayer and ecr:BatchCheckLayerAvailability only on arn:aws:ecr:ap-south-1:111122223333:repository/orders-api.

  • If the pipeline runs in another account, also add a repository policy on orders-api that allows that role.
  • If images are encrypted with a customer managed KMS key, the role needs kms:Decrypt on it.

The role can log in to the registry, but can pull only from orders-api, not from other repositories.

Q13. You need weekly snapshots of 16 EC2 instances, each kept for 15 days. How do you set it up? Mid level

Tag the instances (for example backup=weekly-15d), then use either:

  • AWS Backup: a backup plan with a weekly rule (cron schedule), lifecycle "delete after 15 days", and a resource assignment that selects by tag. It gives central reports, cross-Region or cross-account copies and Vault Lock if needed.
  • Amazon Data Lifecycle Manager: a policy that targets the tag, creates snapshots weekly and keeps them for 15 days (age-based retention).
aws backup create-backup-plan --backup-plan file://weekly-15d.json

From now on, new instances with the tag are included automatically, with no scripts. Test a restore after the first run, and alarm on failed backup jobs.

Q14. How do you let a Lambda function in account A read objects from an S3 bucket in account B? Mid level

Both sides must allow it:

  • In account A: the Lambda execution role has a policy allowing s3:GetObject (and s3:ListBucket if needed) on arn:aws:s3:::reports-222233334444 and its objects.
  • In account B: the bucket policy allows that role ARN (arn:aws:iam::111122223333:role/report-reader) the same actions.
  • If objects use SSE-KMS with a customer managed key, the key policy in B must allow the role kms:Decrypt, and the role's policy must allow it too.
  • Keep Object Ownership set to "bucket owner enforced" so objects written by other accounts are still controlled by B.

Alternative: the function assumes a role in account B (sts:AssumeRole) with access to the bucket, which keeps all permissions managed in B.

Q15. Someone manually deleted a resource that Terraform manages. What happens on the next plan, and what do you do? Mid level

On the next terraform plan, Terraform refreshes state, sees the resource no longer exists, and plans to create it again.

What to do:

  • Find out why it was deleted (CloudTrail shows who and when).
  • If it should exist: review the plan carefully and apply to recreate it; restore data from backups if it held data (Terraform recreates an empty resource).
  • If it should be gone: remove it from the configuration (or use a removed block or terraform state rm), so Terraform stops managing it.
  • Prevent repeats: limit console write access in production, use SCPs or tag-based deny policies, and run scheduled drift detection (a plan in CI that alerts on changes).
Q16. Which IAM permissions do EKS worker nodes need, and why should the CNI permissions not live on the node role? Mid level

The node IAM role usually has these AWS managed policies:

  • AmazonEKSWorkerNodePolicy: lets the kubelet describe resources and join the cluster.
  • AmazonEC2ContainerRegistryReadOnly (or the newer pull-only policy): lets nodes pull images from ECR.
  • AmazonEKS_CNI_Policy: lets the VPC CNI assign IP addresses and network interfaces.
  • Optionally AmazonSSMManagedInstanceCore for Session Manager access.

Best practice: give the CNI policy to the aws-node service account through IRSA or EKS Pod Identity instead of the node role, and give application pods their own roles too, so a compromised pod cannot use broad node permissions. Block pods from reaching instance metadata (IMDSv2 with hop limit 1).

Q17. Write a Lambda function that runs when a file is uploaded to S3 and logs its name and size. Mid level
import json, urllib.parse
def lambda_handler(event, context):
    for rec in event["Records"]:
        bucket = rec["s3"]["bucket"]["name"]
        key = urllib.parse.unquote_plus(rec["s3"]["object"]["key"])
        size = rec["s3"]["object"].get("size", 0)
        print(json.dumps({"bucket": bucket, "key": key, "size": size}))
    return {"processed": len(event["Records"])}

Then add an S3 event notification (s3:ObjectCreated:*) on the bucket that targets the function; S3 needs permission to invoke it (a resource-based policy on the function).

Each upload produces one JSON log line in CloudWatch Logs. Keys arrive URL-encoded, which is why unquote_plus is used. Avoid writing output back to the same bucket prefix, or the function can trigger itself in a loop.

Q18. What CPU target do you use for scaling an Auto Scaling group, and why not 90%? Mid level

Example values only; tune them by testing:

  • Many teams start with target tracking at about 50 to 70% average CPU.
  • Not 90%, because new instances take minutes to launch and warm up. At 90% the existing instances may already be overloaded before help arrives, and one AZ failing would push the rest beyond capacity.
  • Lower targets cost more but give headroom for spikes and AZ loss.
  • CPU is not always the right signal: use request count per target, queue depth or latency for web or worker tiers.
  • Set a warm-up time and use scheduled or predictive scaling for known peaks.

Explain your choice with load test results, not a fixed rule.

Q19. How do you choose the right EC2 instance type for a new backend application? Mid level
  • Understand the workload: CPU-bound, memory-bound, network or storage heavy, steady or spiky. Load test it.
  • Pick the family: general purpose (M, T for low steady load with bursts), compute optimised (C), memory optimised (R, X), storage optimised (I), accelerated (G, P, Inf).
  • Prefer current generation and consider Graviton (arm64) for better price performance if the software supports it.
  • Size by measurement: start reasonable, watch CPU, memory (CloudWatch agent), network and latency, then right-size with Compute Optimizer recommendations.
  • Plan scaling: several smaller instances across AZs are usually better than one big one.
  • Then choose the purchase model (Savings Plans for steady use, Spot for interruptible work).
Q20. What makes an AWS automation script safe to run against production? Mid level
  • Select resources by tags and filters, never by hard-coded lists of IDs.
  • A dry-run mode that prints what would change, and confirmation or approval for destructive actions.
  • Idempotent: running it twice gives the same result.
  • Least-privilege role just for the script; no personal credentials.
  • Pagination, retries with backoff and handling of throttling errors.
  • Clear logs of every action (and CloudTrail for audit); alerts on failure.
  • Limits: change a small batch first, stop on errors, and protect critical resources with tags (for example do-not-stop=true).
  • Run it from a managed place (Lambda, Systems Manager Automation or a pipeline), not a laptop.

4. Senior level and scenario questions

These questions check design thinking and troubleshooting. Think aloud. Say what you check first, what you change, and how you prevent it next time.

Q21. A database has become the bottleneck for a growing application. In what order do you try to scale it? Senior

1. Measure first: slow query logs, Database Insights, CPU, memory, IOPS, connections and locks.

2. Fix queries and indexes; this often gives the biggest win for free.

3. Add caching (ElastiCache) for repeated reads, and connection pooling (RDS Proxy) if connections are the problem.

4. Move read traffic to read replicas (or Aurora replicas).

5. Scale up the instance or storage performance (bigger class, gp3 or io2 IOPS).

6. Move suitable data elsewhere: sessions or carts to DynamoDB, search to OpenSearch, analytics to Redshift.

7. Only then shard or partition the data, because it adds lasting complexity.

Q22. What do you check before calling a containerised service production-ready on AWS? Senior
  • Image: small, scanned (ECR scanning or Inspector), pinned versions, runs as non-root, no secrets inside.
  • Orchestration: ECS or EKS with tasks or pods across at least two AZs, health checks, resource requests and limits, autoscaling.
  • Secrets and config from Secrets Manager or Parameter Store; IAM role per service.
  • Networking: private subnets, security groups per service, load balancer with TLS.
  • Observability: logs to CloudWatch, metrics, traces, alarms and dashboards.
  • Delivery: CI/CD with tests, rolling or blue/green deployments and quick rollback.
  • Resilience: graceful shutdown on SIGTERM, timeouts and retries, tested failure of a task, node and AZ.
Q23. Tell me about a time you pushed back on a risky change. How should you answer? Senior

Use the STAR format (situation, task, action, result) and show judgment, not stubbornness:

  • Situation: for example, a request to apply a database parameter change to production during business hours without testing.
  • Task: protect availability while still helping the team deliver.
  • Action: explain the risk with evidence (what could fail, impact, past incidents), offer a safer path (test in staging, change window, rollback plan, canary), and agree on it with the requester and manager.
  • Result: the change went out safely a day later; or the test found a problem that would have caused an outage.

End with what you learned or changed in the process (for example a change checklist).

Q24. You get an empty AWS account. Walk through getting to a running EKS cluster with GitOps deployments. Senior

1. Account baseline: secure root user, MFA, IAM Identity Center access, CloudTrail, AWS Config, GuardDuty, budgets; ideally the account sits in an Organization with SCPs.

2. Network: VPC across three AZs, public subnets for load balancers, private subnets for nodes, NAT gateways or VPC endpoints, subnet tags for load balancers.

3. Cluster with infrastructure as code (Terraform or eksctl): private API endpoint or restricted public access, access entries for admins, logging on.

4. Compute: managed node groups, Karpenter or EKS Auto Mode.

5. Add-ons: VPC CNI, CoreDNS, kube-proxy, EBS CSI driver, AWS Load Balancer Controller, metrics, Pod Identity.

6. GitOps: install Argo CD or Flux, connect the Git repository, and let it sync applications.

7. Observability and security: Container Insights or Prometheus, image scanning, network policies, backups.

Q25. One pod with 8 GB of memory or several smaller pods: how do you decide? Senior
PointOne large podSeveral smaller pods
AvailabilityOne failure or restart takes the whole service downOthers keep serving during failures and rollouts
SchedulingNeeds a node with 8 GB free; harder to placeFits on more nodes, better bin packing
ScalingCoarse stepsFine-grained horizontal scaling
Fits whenThe app cannot scale out (single-writer, large in-memory cache, licence per instance)Stateless services and workers

Usually choose several smaller pods across AZs with a PodDisruptionBudget, sized by measured memory per request. Keep a large pod only when the app truly needs the memory in one process.

Q26. Design a VPC where the HR team needs internet, the database team must have no internet, admins need limited internet and the creative team needs full internet. Senior
  • Separate subnets (or VPCs) per team, each with its own route table and security groups, across two AZs.
  • HR and creative subnets: private subnets with a default route to a NAT gateway (users reach the internet outbound only). If creative needs inbound access for some servers, put only those behind a load balancer in public subnets.
  • Database subnets: no route to an internet gateway or NAT gateway; reach AWS services through VPC endpoints.
  • Admin subnets: route outbound traffic through AWS Network Firewall (or a proxy) with an allow-list of domains, so "limited internet" is enforced.
  • NACLs as a coarse extra guard between team subnets, and VPC Flow Logs for auditing.
  • If teams are in separate accounts, connect them with Transit Gateway and central egress.
Q27. Give an example of using Lambda for infrastructure automation, and how you made it safe. Senior

Example: a nightly clean-up of unattached EBS volumes in non-production accounts.

  • EventBridge Scheduler runs a Lambda function every night.
  • The function lists volumes in the "available" state, skips any tagged keep=true, and only acts on accounts tagged env=dev or test.
  • First run: report only (to an SNS topic or Slack channel) for two weeks; then snapshot and delete volumes older than 14 days.
  • The role can only describe, snapshot and delete volumes with conditions on tags.
  • Every action is logged, and a weekly summary shows savings.

Other good examples: auto-tagging new resources from CloudTrail events, stopping dev instances at night, or rotating credentials.

5. Frequently asked questions

Do MNC interviews ask different AWS questions from start-ups?

The topics are similar. Service companies often ask more about migrations, client scenarios and broad basics; product companies often go deeper into design and troubleshooting. Both ask about your own projects.

Why are there only 27 questions here?

We removed every question that duplicated one already answered on this site, so only new questions remain. Use the hub page for the rest.

What should I practise?

Write the small scripts on this page yourself (boto3 listing, starting a pipeline, an S3-triggered Lambda function), and be ready to explain one real project end to end.

6. Quick revision

  • A NAT gateway gives private instances outbound internet; a NACL is a stateless subnet firewall. They do different jobs.
  • A subnet uses exactly one route table at a time.
  • S3 gives strong read-after-write consistency for all requests.
  • The root EBS volume is deleted on termination by default; other volumes are kept by default.
  • Use tags, not instance IDs, in automation.

This page is one part of the complete AWS interview question set. Open the full list here: All 2052 AWS interview questions.