Skip to main content

Top 10 high-level EC2 scenario-based questions to challenge your AWS & DevOps skills

 Here are 10 high-level EC2 scenario-based questions to challenge your AWS & DevOps skills


1. Your EC2 instance is running but you can’t connect via SSH. What troubleshooting steps will you take?


 Check Security Group inbound rules (port 22 open to your IP).

 Verify Network ACLs (NACLs not blocking inbound/outbound).

 Confirm instance’s Public IP / Elastic IP.

 Validate Key Pair and correct permissions on .pem.

 Ensure SSM Agent is installed (Session Manager can help).

 Check system logs on the console for OS-level issues.


2. You terminated an EC2 instance by mistake. How can you prevent this in the future?


Enable Termination Protection in EC2 settings.

Use IAM permissions to restrict TerminateInstances.

Tag critical instances and set resource policies.


3. Your EC2 instance needs to access an S3 bucket securely. What’s the best way to configure this?


Best practice: Attach an IAM Role with least privilege policy to the EC2 instance.

Avoid hardcoding credentials or using access keys.


4. An application hosted on EC2 needs to be highly available across AZs. How will you achieve it?


Use an Auto Scaling Group (ASG) spanning multiple AZs.

Place EC2 instances behind an Elastic Load Balancer (ALB/NLB).

Store shared data in EFS, S3, or RDS Multi-AZ.


5. You need to run scheduled scripts on EC2 daily. What approaches are available?


Use cron jobs inside EC2 for OS-level scheduling.

Or AWS Systems Manager Automation Documents.

Or trigger scripts from EventBridge / CloudWatch Events to call SSM Run Command.


6. How will you enable auto-scaling for EC2 based on CPU utilization?


Create an Auto Scaling Group with a Launch Template.

Define a CloudWatch alarm on CPUUtilization.

Attach a scaling policy (step or target tracking).


7. You’re seeing high latency between EC2 and RDS in the same region. What might be wrong?


Verify EC2 and RDS are in the same VPC and AZ.

Check security groups and subnet routing.

Ensure DNS resolution is correct (use private endpoint).

Check instance type & network performance (Enhanced Networking for EC2).


8. You need to move an EC2 instance to another region. What are your options?

Create an AMI of the instance and copy AMI to the target region, then launch.

Or take an EBS snapshot and copy to the other region, then create a volume.

For full migration, use AWS MGN or third-party tools.


9. Your EC2 disk space keeps filling up. How do you investigate and fix this?


SSH into the instance, run df -h and du -sh /* to find large directories.

Rotate or offload logs to CloudWatch Logs or S3.

Expand EBS volume size or use EBS Elastic Volumes.

Automate cleanup (logrotate, tmp cleaner).


10. You have to reduce EC2 costs without affecting performance. Which AWS features can you use? 


Use Right Sizing (smaller instance types).

Spot Instances or Savings Plans for predictable workloads.

Turn off non-production EC2 during off-hours (use Instance Scheduler).

Consider Graviton-based instances for better price/performance.

Comments

Popular posts from this blog

Step-by-Step Explanation of Ballooning, Compression & Swapping in VMware

 ðŸ”¹ Step-by-Step Explanation of Ballooning, Compression & Swapping in VMware ⸻ 1️⃣ Memory Ballooning (vmmemctl) Ballooning is the first memory reclamation technique used when ESXi detects memory pressure. ➤ Step-by-Step: How Ballooning Works  1. VMware Tools installs the balloon driver (vmmemctl) inside the guest OS.  2. ESXi detects low free memory on the host.  3. ESXi inflates the balloon in selected VMs.  4. Balloon driver occupies guest memory, making the OS think RAM is full.  5. Guest OS frees idle / unused pages (because it believes memory is needed).  6. ESXi reclaims those freed pages and makes them available to other VMs. Why Ballooning Happens?  • Host free memory is very low.  • ESXi wants the VM to release unused pages before resorting to swapping. Example  • Host memory: 64 GB  • VMs used: 62 GB  • Free: 2 GB → ESXi triggers ballooning  • VM1 (8 GB RAM): Balloon inflates to 2 GB → OS frees 2 GB → ESXi re...

Quick Guide to VCF Automation for VCD Administrators

  Quick Guide to VCF Automation for VCD Administrators VMware Cloud Foundation 9 (VCF 9) has been  released  and with it comes brand new Cloud Management Platform –  VCF Automation (VCFA)  which supercedes both Aria Automation and VMware Cloud Director (VCD). This blog post is intended for those people that know VCD quite well and want to understand how is VCFA similar or different to help them quickly orient in the new direction. It should be emphasized that VCFA is a new solution and not just rebranding of an old one. However it reuses a lot of components from its predecessors. The provider part of VCFA called Tenenat Manager is based on VCD code and the UI and APIs will be familiar to VCD admins, while the tenant part inherist a lot from Aria Automation and especially for VCD end-users will look brand new. Deployment and Architecture VCFA is generaly deployed from VCF Operations Fleet Management (former Aria Suite LCM embeded in VCF Ops. Fleet Management...

ESXi Host Troubleshooting Checklist

  🛠️ ESXi Host Troubleshooting Checklist (With Complete Log Locations) ✅ 1. Host Status & Connectivity Check host state in vCenter (Connected / Not Responding / Disconnected) Review CPU, RAM, and datastore usage Validate HA/DRS recommendations ✅ 2. Hardware Health Monitor hardware sensors (CPU, DIMMs, fans, PSU, RAID) Check RAID controller logs via vendor tools View hardware status in: vCenter → Monitor → Hardware Health DCUI → Hardware Status ✅ 3. Network Validation Verify vSwitches, Port Groups, NIC teaming, VLAN tagging Check vmkernel ports (mgmt, vMotion, iSCSI, vSAN) Test reachability using: Shell vmkping < IP > Show more lines Validate physical NIC status and link speed ✅ 4. Storage & Datastore Checks Confirm datastore accessibility Rescan storage adapters (iSCSI/FC/NFS) Validate multipathing (Round Robin / Fixed / MRU) Check datastore latency with esxtop ✅ **5. Critical Logs & Their Locations (Full List) Here are key ESXi log files that every VMware adm...