🔍Most Asked AWS Interview Questions & Insights .


🔧 1. Name 5 AWS Services You've Used and Their Use Cases
EC2 (Elastic Compute Cloud):
Used to launch and manage virtual servers in the cloud. Great for running applications, APIs, or backend systems with full control over the OS.S3 (Simple Storage Service):
Object storage for storing static data like images, logs, backups, or hosting static websites. It’s highly durable and cost-effective.IAM (Identity and Access Management):
Manages permissions and user access to AWS services. Ensures only the right entities can access specific resources securely.RDS (Relational Database Service):
A managed database service that supports engines like MySQL, PostgreSQL, and SQL Server. It automates backups, patching, and scaling.CloudWatch:
A monitoring and observability service. Helps collect logs, track performance metrics, and set up alerts for various AWS resources.
📤 2. What Tools Are Used to Send Logs to the Cloud?
CloudWatch Logs:
AWS-native service for collecting, monitoring, and analyzing log data from resources like EC2, Lambda, or custom apps.Fluentd / Fluent Bit:
Open-source log forwarders often used in containerized environments. They send logs to CloudWatch, Elasticsearch, or S3.Logstash (Elastic Stack):
Popular in ELK stack setups. Collects, parses, and routes logs for advanced search and visualization with Kibana.AWS Firehose:
Part of the Kinesis service. Streams large volumes of logs and data to destinations like S3, Redshift, or Elasticsearch in near real-time.
👮♂️ 3. What Are IAM Roles?
IAM Roles allow AWS services or users to temporarily assume permissions. They're essential for granting controlled access without hardcoding credentials. Commonly used with EC2, Lambda, or federated users. You can manage roles using the AWS Console, CLI, or IaC tools like Terraform and CloudFormation.
🔄 4. How to Upgrade/Downgrade a System with Zero Downtime?
To avoid service interruptions, use Elastic Load Balancer and Auto Scaling Groups. Deploy new versions to fresh instances while keeping old ones live (Blue-Green Deployment). Redirect traffic gradually (Canary Deployment) and manage DNS routing using Route 53.
🏗️ 5. What is infrastructure as code and how do you use it?
IaC means managing your infrastructure using code files instead of manual setups. This enables version control, repeatability, and automated provisioning. Popular tools include:
CloudFormation (AWS-native, YAML/JSON)
Terraform (multi-cloud, HCL language)
CDK (code-based IaC using Python/TypeScript)
Use Case: Write a Terraform file to spin up an EC2 instance, an S3 bucket, and connect them — all with a single command.
⚖️ 6. What is a load balancer? Give scenarios of each kind of balancer based on your experience.
A load balancer distributes traffic across multiple servers to improve performance, reliability, and uptime.
🔹 Types of Load Balancers (with scenarios):
- Layer 4 (Transport Layer)
Routes based on IP/port (TCP/UDP)
Example: Multiplayer game servers using UDP—traffic is evenly distributed by IP/port (e.g., AWS Network Load Balancer)
- Layer 7 (Application Layer)
Routes based on content (URLs, headers, cookies)
Example: Web app routes
/api
to backend A and/media
to backend B (e.g., NGINX, AWS ALB)
- Global Load Balancer / DNS-Based
Routes users to the nearest region/data center
Example: A global app like Netflix uses it to send users to the closest server (e.g., AWS Route 53, Cloudflare)
🧱 7. What is AWS CloudFormation?
CloudFormation is AWS’s native IaC tool that allows you to define and deploy infrastructure using YAML or JSON templates. It's perfect for automating the creation of VPCs, EC2 instances, databases, and more in a repeatable and consistent way.
⚙️ 8.Difference between AWS CloudFormation and AWS Elastic Beanstalk?
CloudFormation is a low-level tool that gives full control over every AWS resource. It’s ideal for complex, customized environments.
Elastic Beanstalk is a PaaS (Platform as a Service) that abstracts the infrastructure and is best for quick app deployment. It's easy to use but less flexible.
🔐 9. What Types of Cloud Attacks Can Occur? How to Minimize Them?
Common threats include:
DDoS attacks
Leaked access keys
Misconfigured S3 buckets
Injection attacks (SQL/XSS)
Prevention strategies:
Use AWS WAF and Shield for protection
Enable encryption, rotate keys regularly
Apply IAM policies with least privilege
Run AWS Config and GuardDuty for audits and threat detection
🔑 10. Can You Recover an EC2 Instance if the Key Is Lost?
Yes — although the original key can't be retrieved. Instead:
Stop the instance
Detach the root volume
Attach it to another instance
Modify the
authorized_keys
file with a new keyReattach and start the original instance
🌉 11. What is a Gateway?
In AWS, gateways are used to connect networks:
Internet Gateway: Provides internet access to public subnets
NAT Gateway: Allows private instances to access the internet
Transit Gateway: Connects multiple VPCs and on-premise networks through a central hub
🧮 12. What is the difference between the Amazon Rds, Dynamodb, and Redshift?
RDS: Relational database (e.g., MySQL, PostgreSQL) for traditional transactional applications.
DynamoDB: NoSQL key-value store with auto-scaling and single-digit millisecond latency.
Redshift: Columnar data warehouse optimized for analytics and complex queries on big datasets.
🌐 13. Do you prefer to host a website on S3? What's the reason if your answer is either yes or no?
✅ Yes, if it’s a static site (HTML, CSS, JS).
S3 offers low-cost, high-speed, and globally distributed static website hosting.
❌ No, if the site needs server-side logic (e.g., databases, authentication).
For that, use Lambda, EC2, or Elastic Beanstalk in combination with API Gateway or RDS.
Subscribe to my newsletter
Read articles from Apurva Gargote directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Apurva Gargote
Apurva Gargote
👨💻 Last-year student diving deep into DevOps, Cloud Engineering, and Infrastructure Automation. Passionate about building scalable, efficient, and secure systems. Let’s connect and build something amazing! 🚀