🎤 Top 81 Interview Questions
Yeh sabse common Java interview questions hain — tap karke answer kholo.
Amazon Web Services — duniya ki sabse badi cloud computing platform hai, jo 200+ services (compute, storage, databases, networking) pay-as-you-go model mein offer karti hai.
IaaS (Infrastructure as a Service — jaise EC2), PaaS (Platform as a Service — jaise Elastic Beanstalk), aur SaaS (Software as a Service — jaise Gmail).
Region ek geographic area hai (jaise ap-south-1 Mumbai) jisme multiple Availability Zones (AZs) hote hain. Har AZ physically separate data center hai, low-latency links se connected.
Ye Regions se alag chote sites hain jo CloudFront (AWS ka CDN) use karte hain content ko users ke paas cache karne ke liye — latency kam karne ke liye.
"aws configure" command chala kar Access Key, Secret Key, default region aur output format set kiya jaata hai — ye "~/.aws/credentials" file mein store hota hai.
Programming languages (Python ke liye boto3, JavaScript ke liye aws-sdk) mein libraries jo developers ko apni applications ke code se hi directly AWS services call karne dete hain.
AWS "security OF the cloud" (physical data centers, hardware, networking) ke liye responsible hai. Customer "security IN the cloud" (data, IAM permissions, app security) ke liye responsible hai.
RDS jaise managed services mein AWS zyada responsibility leta hai (patching, backups). EC2 jaise unmanaged services mein customer zyada responsible hai (OS patching, security config).
Naye accounts ke liye limited usage free hoti hai (jaise t2.micro/t3.micro EC2 hours, 5GB S3 storage) — practice aur learning ke liye best starting point hai.
User ek permanent identity hai (person ya application), Group users ka collection hai (permissions ek saath manage karne ke liye), aur Role ek temporary identity hai jise koi bhi "assume" kar sakta hai.
Roles ko temporary credentials milte hain jo automatically expire ho jaate hain — hardcoded User access keys ki tarah leak hone ka risk nahi rehta.
JSON document jisme "Effect" (Allow/Deny), "Action" (kaunsa API call), "Resource" (kaunse ARN par), aur optional "Condition" hote hain.
Har user/role ko sirf utni hi permissions do jitni uske kaam ke liye zaroori hai — na kam na zyada. Sabse important IAM security best practice hai.
Explicit Deny hamesha Allow ko override karta hai — chahe kitne bhi Allow statements ho, ek Deny sab ko cancel kar deta hai.
Root account ke paas unrestricted access hota hai — daily kaam ke liye ek IAM User banana chahiye aur root ko sirf initial setup/billing tasks ke liye rakhna chahiye.
Multi-Factor Authentication — password ke saath ek extra temporary code (authenticator app ya hardware key) require karta hai, account takeover ka risk drastically kam karta hai.
Key Management Service — encryption keys ko create aur manage karta hai. AWS Managed Keys AWS khud banata hai, Customer Managed Keys tum khud create karte ho poori control ke saath.
KMS mein ek data key se actual data encrypt hota hai, aur wo data key khud ek master key se encrypt ho jaati hai — large data ko efficiently encrypt karne ka standard tareeka.
Elastic Compute Cloud — AWS ki core compute service, jisse virtual servers (instances) seconds mein launch kiye ja sakte hain, different sizes aur configurations ke saath.
"t" family (general purpose burstable), "3" generation, aur "micro" size — naam se hi type, generation aur size pata chalta hai.
Amazon Machine Image — ek template jisme OS, applications aur configuration pehle se installed hoti hai. Running instance se custom AMI banai ja sakti hai.
On-Demand mein per-second pay karo bina commitment ke. Reserved mein 1-3 saal commitment karke 40-70% discount milta hai. Spot AWS ki unused capacity hai, 90% tak cheap lekin kabhi bhi terminate ho sakti hai.
Sirf fault-tolerant workloads (batch jobs, data processing) ke liye — production web servers ke liye nahi kyunki ye achanak terminate ho sakti hain.
Savings Plans mein ek hourly "$" commitment karte ho (instance type/region flexible), Reserved Instances mein specific instance type/region commit karna padta hai.
Agar inbound traffic allow hai to uska response (outbound) automatically allow ho jaata hai — alag se outbound rule banane ki zaroorat nahi.
Public key AWS ke paas rehti hai aur instance mein inject hoti hai, private key tum apne paas rakhte ho — SSH connect karne ke liye private key chahiye hoti hai.
Usi instance mein dobara SSH karna mushkil ho jaata hai — naya key pair attach karne ke extra steps karne padte hain (jaise EBS volume detach-attach karke).
Bucket naam globally unique hona chahiye poore AWS mein — lowercase letters, numbers aur hyphens hi use ho sakte hain.
S3 mein true folders nahi hote — har object ka ek "key" hota hai (jaise "photos/2026/cat.jpg") jo ek flat structure mein store hota hai, console folder-like view dikhata hai.
Standard frequently accessed data ke liye hai (fastest, expensive). Standard-IA rarely accessed data ke liye cheaper hai lekin retrieval par extra charge lagta hai.
Archival data ke liye — sabse cheap storage class hai lekin retrieval mein minutes se hours lag sakte hain, long-term compliance data ke liye ideal.
Access pattern predictable na ho to ye automatically objects ko sahi tier mein move karta hai, cost optimize karne ke liye — bina manual intervention ke.
Har object ki multiple versions store hoti hain — accidental delete/overwrite hone par bhi purani version restore ki ja sakti hai.
Automatically objects ko ek time period ke baad cheaper storage class mein move karte hain (jaise 30 din baad IA, 90 din baad Glacier) ya expire karte hain.
EBS block storage hai — ek hi EC2 instance se attach hota hai, single-AZ. EFS file storage hai — multiple EC2 instances simultaneously mount kar sakte hain, multi-AZ.
EBS, kyunki isko low latency block storage chahiye hoti hai databases ke liye. S3 static assets, backups aur data lakes ke liye better hai.
Virtual Private Cloud — ek logically isolated network AWS ke andar, jahan tum khud IP ranges, subnets, route tables aur gateways define karte ho.
VPC ke possible IP range ko define karta hai — jaise "10.0.0.0/16" ka matlab 65,536 possible IP addresses.
Public subnet ki route table mein Internet Gateway ka route hota hai — direct internet access. Private subnet mein ye route nahi hota, isliye internal resources (databases) yahan rakhe jaate hain.
Rules ka ek set hai jo batata hai ki network traffic kahan jaaye — har subnet ko ek route table associate karni padti hai.
Ek horizontally-scaled redundant gateway jo VPC ko internet se connect karta hai — ek VPC mein sirf ek hi IGW attach ho sakta hai.
Private subnet ke resources ko internet ki taraf outbound requests (jaise software updates) bhejne deta hai, lekin inbound connections ko block karta hai.
Hamesha public subnet mein, kyunki use khud internet access chahiye hoti hai use karne waale resources ke liye jo private subnet mein hote hain.
On-premises data center ko encrypted tunnel ke zariye AWS VPC se connect karta hai — hybrid cloud setups ke liye common approach hai.
Sabse specific route hamesha win karta hai — jaise ek /24 route ek /16 route se pehle match hoga.
Relational Database Service — fully managed relational database, MySQL, PostgreSQL, MariaDB, Oracle, SQL Server aur Aurora support karta hai.
Patching, backups aur hardware maintenance AWS khud handle karta hai — developers ko infrastructure ki chinta kam karni padti hai.
RDS ek synchronous standby replica ko ek alag AZ mein maintain karta hai — primary database fail hone par automatic failover ho jaata hai, disaster recovery ke liye hai.
Asynchronously primary database se sync hoti hain — read-heavy applications mein read traffic ko multiple replicas mein spread kar ke performance improve ki ja sakti hai.
Multi-AZ availability/disaster recovery ke liye hai (standby query nahi ki ja sakti), Read Replicas performance scaling ke liye hain (directly query ki ja sakti hain).
Ek fully managed NoSQL database — RDS ke unlike har row ka schema different ho sakta hai, har item ki ek primary key hoti hai.
Provisioned mein pehle se read/write capacity units define karte ho (predictable workloads ke liye cheaper). On-Demand mein AWS automatically traffic ke hisaab se scale karta hai.
Automated backups point-in-time recovery enable karte hain aur default 7 din retain hoti hain. Manual snapshots kabhi expire nahi hote, jab tak khud delete na karo.
AWS ka apna database engine hai jo MySQL/PostgreSQL-compatible hai lekin traditional RDS engines se much faster aur scalable hai.
Ek serverless compute service jisme code sirf tab run hota hai jab ek event use trigger karta hai — idle time ke liye koi billing nahi hoti.
Jab ek naya container spin up karna padta hai kisi request ko handle karne ke liye — ye extra latency add karta hai first invocation par.
15 minutes — isse zyada long-running tasks ke liye EC2 ya ECS jaise services use karne chahiye.
Har invocation ko ek naya container mil sakta hai (ya ek warm container reuse ho sakta hai) isliye in-memory state par depend nahi karna chahiye.
S3 (file upload par), API Gateway (HTTP request par), DynamoDB Streams (table changes par), aur CloudWatch Events (scheduled jobs ke liye).
REST API full-featured hai (request validation, caching, API keys), HTTP API simpler, cheaper aur faster hai — modern serverless applications ke liye usually enough hai.
API Gateway mein poora HTTP request (headers, body, query params) event object ki tarah directly Lambda function ko pass ho jaata hai.
S3 (static frontend host karta hai) + API Gateway (backend API endpoint) + Lambda (business logic) + DynamoDB (data storage) — bina server manage kiye poora stack run hota hai.
Multiple Lambda functions ko ek visual workflow mein orchestrate karta hai — retries, error handling aur parallel execution jaisi complex logic ek state machine mein manage hoti hai.
ALB Layer 7 (HTTP/HTTPS) par kaam karta hai, path/hostname-based routing kar sakta hai. NLB Layer 4 (TCP/UDP) par kaam karta hai, ultra-low latency aur high throughput deta hai.
Kyunki ek hi load balancer se URL path ya hostname ke basis par traffic ko multiple different services (target groups) tak route kiya ja sakta hai.
EC2 instances (ya Lambda functions ya IPs) ka ek set jahan Load Balancer traffic route karta hai — ek hi ALB ke multiple target groups ho sakte hain.
Load Balancer periodically har target ko ek health check request bhejta hai — response expected na ho to target ko "unhealthy" mark kar ke traffic routing band kar deta hai.
Ek minimum, desired aur maximum number of instances maintain karta hai — crash hone par automatically ek naya instance launch karta hai.
Agar ek AZ mein problem ho to ASG doosre AZ mein more instances launch kar ke availability maintain karta hai.
Ek target metric (jaise "70% average CPU utilization") set karte ho aur ASG automatically instances add/remove karta hai us target ko maintain karne ke liye.
Jab traffic patterns predictable hon (jaise e-commerce sale event) — ek specific time par capacity increase/decrease ki ja sakti hai, reactive scaling se behtar hai.
ASG ke naye instances kaise dikhenge — AMI, instance type, security groups, key pair waghera — ASG hamesha launch template ke saath kaam karta hai.
AWS services se metrics collect karta hai (jaise CPU utilization), alarms threshold cross hone par trigger karte hain, aur logs applications se collect ki ja sakti hain.
CloudTrail "who did what" (API-level audit logs) answer karta hai, CloudWatch "how is it performing" (metrics aur application logs) answer karta hai.
Kyunki ye account ke har single API call ko log karta hai — kaun, kya, kab aur kahan se — permissions ya resources mein unauthorized changes track karne ke liye zaroori hai.
Operational Excellence, Security, Reliability, Performance Efficiency, Cost Optimization, aur Sustainability.
Source (GitHub/CodeCommit se code pull), Build (CodeBuild se compile/test), aur Deploy (EC2/ECS/Lambda par deploy).
"buildspec.yml" file ke instructions follow karke code ko compile, test aur package karta hai.
Ek monthly spending limit set kar sakte ho — threshold cross hone par email alert milta hai, accidental over-spending se bachaata hai.
Past AWS spending ko visualize karta hai — service ke hisaab se ya time ke hisaab se breakdown dikhata hai.
Resources ko tags (jaise "Project: Alpha") assign karne se Cost Explorer mein expenses ko project ya team ke hisaab se breakdown kiya ja sakta hai.