AWS Imp Interview Question
AWS Imp Interview Question
Dear Reader,
As someone deeply involved in cloud and data engineering, I know firsthand how
overwhelming AWS interview preparation can feel — with its vast set of services, real-world
use cases, and syntax-heavy solutions. That’s why I created this product: to help you bridge
the gap between theory and practice.
In this guide, I’ve included not only interview questions and answers, but also:
Whether you're a fresher or an experienced engineer aiming for your next big cloud role —
ai
my goal is to help you understand, not just memorize.
or
I hope this becomes a valuable asset in your journey to crack AWS interviews with
nG
– Suden Gorai
Su
Structure:
Answer:
Amazon Web Services (AWS) is a cloud computing platform provided by Amazon that offers on-
demand services like compute power, storage, networking, databases, and more — on a pay-as-you-
go model.
Example:
Instead of buying your own server, you can rent a virtual one (EC2) on AWS for only the hours you
need it.
Answer:
•
ai
Scalability: Automatically adjust resources to match demand
or
• Pay-as-you-go: No upfront costs
nG
Answer:
• IaaS (Infrastructure as a Service): You manage software; AWS provides infrastructure (e.g.,
EC2)
• PaaS (Platform as a Service): AWS manages infrastructure & runtime (e.g., AWS Elastic
Beanstalk)
Answer:
The AWS Free Tier allows new users to explore AWS for 12 months with limited free access to
services like EC2, S3, RDS, Lambda.
Example:
You can use a t2.micro EC2 instance with 750 hours/month for free in the first year.
Q5: What are Availability Zones and Regions?
Answer:
Example:
us-east-1 has multiple AZs (like us-east-1a, 1b, 1c) — you can deploy your app in multiple AZs to
ensure high availability.
Answer:
Amazon S3 (Simple Storage Service) is object storage used for storing unstructured data (files,
images, videos, etc.).
Example:
ai
You can host a static website or store user profile images in S3.
or
nG
Answer:
de
Amazon EC2 (Elastic Compute Cloud) allows you to rent virtual servers (instances) to run
applications.
Su
Example:
Use EC2 to deploy a backend service like a Django or Node.js API.
Answer:
IAM (Identity and Access Management) is a service to securely manage access to AWS services and
resources.
Example:
You can create a user “developer1” who only has read access to S3 but no access to EC2.
Answer:
A VPC (Virtual Private Cloud) is your own isolated network in AWS where you can launch EC2
instances, create subnets, and control traffic flow.
Example:
You can create a public subnet for a web server and a private subnet for a database server within the
same VPC.
Answer:
An Elastic IP is a static, public IPv4 address that you can allocate to your AWS account and associate
with EC2 instances.
Example:
If you want your EC2 server to have a permanent public IP (instead of dynamic), use an Elastic IP.
Answer:
• EC2: You manage the server. Good for long-running, stateful applications.
de
• Lambda: Serverless — AWS runs the code for you in response to events. Ideal for short,
stateless executions.
Su
Example:
Use EC2 to host a backend API. Use Lambda to process image uploads to S3.
Answer:
EC2 instances are categorized by use case:
Answer:
EBS (Elastic Block Store) is block storage for EC2. Like a virtual hard disk.
Example:
When you launch an EC2 instance, its root volume is typically an EBS volume.
Answer:
Answer:
•
de
Answer:
A JSON-based access policy attached to an S3 bucket to control permissions.
Example:
Allow all public users to read objects in a static website bucket.
Answer:
RDS (Relational Database Service) is a managed database service for SQL-based databases like
MySQL, PostgreSQL, Oracle, SQL Server, and Aurora.
Example:
You can deploy a MySQL database without managing backups, patching, or high availability.
Q18: What is Multi-AZ in RDS?
Answer:
Multi-AZ provides automatic failover for high availability. AWS maintains a standby replica in a
different AZ.
Answer:
Read Replicas allow you to scale read operations by duplicating your database in real-time.
Example:
Use replicas for analytics queries while keeping the master DB fast for writes.
Answer:
Aurora is a high-performance, fully managed MySQL/PostgreSQL-compatible database with better
ai
performance and scalability than traditional RDS.
or
nG
Answer:
de
Lambda is a serverless compute service that runs code in response to triggers (like S3 uploads, API
Gateway, or CloudWatch events).
Su
Example:
Automatically resize images uploaded to an S3 bucket.
Answer:
Lambda auto-scales based on the number of incoming requests. Each request triggers a separate
execution environment.
Answer:
Currently, 15 minutes is the maximum allowed runtime per execution.
Q24: What is API Gateway?
Answer:
Amazon API Gateway allows you to build and expose REST APIs or WebSocket APIs and connect
them to Lambda, EC2, or other services.
Example:
Use API Gateway + Lambda to build a serverless backend.
Answer:
CloudWatch is a monitoring service to track metrics, logs, and alarms for AWS resources.
Example:
Set up an alarm if EC2 CPU utilization goes above 80%.
Answer: ai
CloudTrail records API calls and activity across AWS services for audit and compliance.
or
Example:
nG
Answer:
ASG automatically scales EC2 instances up/down based on demand (CPU usage, etc.).
Answer:
ELB automatically distributes incoming traffic across multiple EC2 instances.
Types:
Answer:
Route 53 is AWS’s DNS and domain management service. Supports routing, health checks, failover,
etc.
Answer:
CloudFormation allows you to define your infrastructure using templates (YAML/JSON), enabling
“Infrastructure as Code”.
Example:
Automate deployment of a VPC + EC2 + RDS with one file.
ai
or
nG
de
Su
🔹 Part 3: Scenario-Based & Advanced AWS Interview Questions (Q31–60)
These questions test hands-on experience, decision-making, and how well you understand real AWS
architectures.
Q31: How would you make a highly available web application on AWS?
Answer:
Use a combination of services:
• Deploy the app on EC2 Auto Scaling Groups across multiple AZs
Answer:
Q33: What happens if you delete the root EBS volume of an EC2 instance?
Answer:
If the Delete on Termination flag is set to true, the root volume will be deleted when the instance is
terminated. If set to false, it will persist after instance termination.
Q34: You want to store 100TB of infrequently accessed data. Which S3 storage class should you
choose?
Answer:
Use S3 Glacier Deep Archive or S3 Standard-IA depending on retrieval needs. Glacier is cheaper but
slower for access.
Q35: How can you automate daily backups for RDS?
Answer:
• Alternatively, create custom scheduled Lambda + snapshot logic for more control
Q36: How do you restrict an IAM user to access only a specific S3 bucket?
Answer:
Create an IAM policy like:
"Effect": "Allow",
"Action": "s3:*",
"Resource": [
ai
or
"arn:aws:s3:::your-bucket",
nG
"arn:aws:s3:::your-bucket/*"
]
de
}
Su
Q37: How can you transfer 1 TB of data from on-prem to AWS securely?
Answer:
Q38: You need to serve a static website with low latency worldwide. What services do you
use?
Answer:
Q39: How do you make Lambda functions access resources in a private VPC?
Answer:
Q40: What is the best way to control cost across multiple AWS accounts in an organization?
Answer:
•
ai
Use Service Control Policies (SCPs) to restrict expensive services
or
nG
Answer:
de
• Meaning: reading immediately after a delete might still return the old object briefly
Answer:
A NAT Gateway allows instances in a private subnet to connect to the internet without receiving
inbound traffic from the internet.
Answer:
Answer:
Example:
Connect VPC-A and VPC-B without needing a VPN or NAT Gateway.
de
Su
Answer:
AWS KMS (Key Management Service) is used to create and manage encryption keys for your AWS
resources.
Answer:
Yes. Lambda is a fully managed service that runs code in multiple AZs automatically. No need to
choose one.
Answer:
Use EventBridge (CloudWatch Events) to trigger a Lambda function on a scheduled cron expression.
Q49: How can you share a snapshot of your RDS database with another AWS account?
Answer:
Make the snapshot public or share it with a specific AWS account under snapshot permissions.
Answer:
• Enable versioning
• Set bucket policies to deny delete actions unless specific conditions are met
ai
or
nG
de
Su
🔹 Part 4: Security, DevOps, Billing & Monitoring (Q51–80)
These questions focus on topics commonly asked in DevOps, Cloud Security, and Cloud Cost
Management roles.
Answer:
• AWS is responsible for security of the cloud (infrastructure, hardware, data centers).
• You (the customer) are responsible for security in the cloud (IAM, S3 access, encryption,
etc.).
Answer:
AWS Key Management Service (KMS) enables you to create and manage encryption keys for S3, RDS,
Lambda, etc.
Example:
ai
or
Use KMS to encrypt S3 objects with a customer-managed key.
nG
Answer:
AWS Secrets Manager stores and rotates secrets like database passwords, API keys, and tokens
Su
securely.
Answer:
• CloudTrail logs all API calls (who did what, when) – ideal for auditing.
• CloudWatch monitors metrics (CPU, memory, logs) – ideal for system health.
Answer:
Answer:
• An IAM Role is assumed by AWS services or federated users and has temporary security
credentials
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::my-bucket"
Attach this IAM Role to the EC2 instance, and it can access S3 without embedding credentials.
ai
or
Q57: What is AWS Config?
nG
Answer:
AWS Config monitors and records changes to AWS resources for audit/compliance.
--configuration-recorder-name default
Answer:
SCPs allow central control of permissions across accounts. You can restrict access to services like EC2
or S3 across an entire org unit.
Q59: How can you monitor the cost of your AWS usage?
Answer:
Answer:
It allows multiple AWS accounts in an AWS Organization to share one billing account for bulk
discount pricing and simplified management.
Answer:
It is a security assessment service that automatically scans EC2 instances or containers for
vulnerabilities and compliance issues.
Answer:
A threat detection service that uses machine learning to identify suspicious behavior like
unauthorized access or data exfiltration.
ai
or
Q63: What is AWS WAF?
nG
{
Su
"Name": "BlockSQLInjection",
"Priority": 1,
"Statement": {
"SqliMatchStatement": {
Deploy this rule via WAF WebACL and associate it with an ALB or CloudFront distribution.
Q64: What is Shield and how does it differ from WAF?
Answer:
Answer:
Use the AWS Developer Tools suite:
Answer:
• Post-deployment validation
de
• Rollback automation
Su
Answer:
It checks whether your deployed resources differ from your CloudFormation template — helps
identify manual changes.
Answer:
A Platform-as-a-Service (PaaS) that handles provisioning, load balancing, and auto-scaling for apps in
Node.js, Python, Java, etc.
Q69: What are CloudWatch Logs and Log Insights?
Answer:
• CloudWatch Logs store log data from EC2, Lambda, ECS, etc.
• Log Insights lets you query logs with SQL-like syntax for debugging and monitoring.
| limit 20
Answer:
ai
or
• Use CloudWatch metrics for CPU, memory, connections
nG
Q71: What is Spot Instance and when should you use it?
Answer:
Spot Instances are unused EC2 capacity at up to 90% discount, but can be terminated anytime.
Answer:
ECS is a container orchestration service to deploy and scale Docker containers. Can run on EC2 or
Fargate.
Q73: What is Fargate?
Answer:
A serverless compute engine for containers. You don’t manage servers, just define the container
specs.
Answer:
--bucket my-bucket \
--bucket-logging-status '{ ai
"LoggingEnabled": {
or
"TargetBucket": "my-logging-bucket",
nG
"TargetPrefix": "logs/"
}
de
}'
Su
Answer:
A service that provides real-time recommendations on cost optimization, security, performance, and
service limits.
Answer:
Amazon Elastic Container Registry is a managed Docker container registry for storing, managing, and
deploying images.
Q77: What is an Amazon AMI?
Answer:
Amazon Machine Image is a template used to launch EC2 instances. It contains OS, application
server, and apps.
Answer:
A serverless event bus that lets AWS services, SaaS apps, and your code react to events across your
system.
Answer:
Step Functions is a serverless workflow service that orchestrates AWS services using a visual
interface and state machine logic.
ai
Q80: How do you restrict access to Lambda only from a specific VPC?
or
Answer:
nG
A. EC2
B. Lambda
C. RDS
D. Elastic Beanstalk
Explanation:
AWS Lambda runs code without provisioning servers. Others require managing servers or containers.
A. Use SSL ai
B. Use IAM Policies
or
C. Enable Server-Side Encryption (SSE)
D. Use AWS WAF
nG
--sse AES256
Q83: You want to restrict access to an S3 bucket to only EC2 instances with a specific role.
What do you use?
Example:
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::123456789012:role/EC2S3ReadRole"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::my-bucket/*"
Q84: What AWS service allows querying structured data in S3 using SQL?
A. Athena
B. Redshift
C. RDS
D. EMR
A. Use Route 53
B. Use CodePipeline + CodeDeploy
C. Use EC2 User Data
de
Q86: Which CLI command gives you a list of running EC2 instances?
Correct Answer: B
Answer:
"Effect": "Allow",
"Action": [
"dynamodb:GetItem",
"dynamodb:PutItem"
],
"Resource": "arn:aws:dynamodb:us-east-1:123456789012:table/MyTable"
Q88: You want to route 80% of traffic to one Lambda and 20% to another. What do you use?
--function-name MyFunction \
--name PROD \
de
--routing-config '{"AdditionalVersionWeights":{"2":0.2}}'
Su
--lookup-attributes AttributeKey=EventName,AttributeValue=PutUserPolicy \
--max-results 10
Q90: You need to auto-tag resources based on user identity. What service helps?
Workflow:
aws ce get-cost-and-usage \
--time-period Start=2024-06-01,End=2024-06-30 \
--granularity MONTHLY \
--metrics "UnblendedCost" \
--group-by Type=DIMENSION,Key=SERVICE
Q92: How can you control which regions a developer can launch resources in?
Example SCP:
"Effect": "Deny",
ai
or
"Action": "*",
nG
"Resource": "*",
"Condition": {
de
"StringNotEquals": {
Su
Q95: What’s the best way to run Spark jobs on AWS without managing servers?
Q96: You want to provision resources automatically using code. What do you use?
Resources:
MyBucket:
Type: AWS::S3::Bucket ai
Properties:
or
BucketName: my-example-bucket
nG
--bucket my-bucket \
--versioning-configuration Status=Enabled
--function-name myFunction \
--runtime python3.9 \
--role arn:aws:iam::123456789012:role/lambda-role \
--handler lambda_function.lambda_handler \
--zip-file fileb://function.zip
Q100: You want to give temporary access to an S3 object. What do you use?
• Customer behavior
You need to build a daily data pipeline to ingest raw data from multiple sources and deliver it in an
analytics-ready format for dashboards in Amazon QuickSight or Redshift.
Pipeline Overview
datasource = glueContext.create_dynamic_frame.from_options(
de
connection_type="mysql",
table_name="orders"
datasink = glueContext.write_dynamic_frame.from_options(
frame=datasource,
connection_type="s3",
connection_options={"path": "s3://ecommerce-data/raw/orders/"},
format="parquet"
• Clean nulls
• Convert currencies
orders_df = glueContext.create_dynamic_frame.from_catalog(database="ecomm",
table_name="orders").toDF()
cust_df = glueContext.create_dynamic_frame.from_catalog(database="ecomm",
table_name="customers").toDF()
COPY orders
FROM 's3://ecommerce-data/processed/orders/'
IAM_ROLE 'arn:aws:iam::123456789012:role/MyRedshiftRole'
FORMAT AS PARQUET;
o Abandoned carts
Optional Enhancements
data from RDS and CSVs, applied PySpark transformations for cleansing and enrichment, and loaded
the data into Redshift and S3. I used Glue Catalog for schema management and QuickSight for
visualization. I also added error handling via Step Functions and alerting using CloudWatch.
de
Su