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

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...
  Issue with Aria Automation Custom form Multi Value Picker and Data Grid https://knowledge.broadcom.com/external/article?articleNumber=345960 Products VMware Aria Suite Issue/Introduction Symptoms: Getting  error " Expected Type String but was Object ", w hen trying to use Complex Types in MultiValue Picker on the Aria for Automation Custom Form. Environment VMware vRealize Automation 8.x Cause This issue has been identified where the problem appears when a single column Multi Value Picker or Data Grid is used. Resolution This is a known issue. There is a workaround.  Workaround: As a workaround, try adding one empty column in the Multivalue picker without filling the options. So we can add one more column without filling the value which will be hidden(there is a button in the designer page that will hide the column). This way the end user will receive the same view.  
  "Cloud zone insights not available yet, please check after some time" message on Aria Automation https://knowledge.broadcom.com/external/article?articleNumber=314894 Products VMware Aria Suite Issue/Introduction Symptoms: The certificate for Aria operations has been replaced since it was initially added to Aria Automation as an integration. When accessing the Insights pane under  Cloud Assembly  ->  Infrastructure  ->  Cloud Zone  ->  Insights  the following message is displayed:   "Cloud zone insights not available yet, please check after some time." The  /var/log/services-logs/prelude/hcmp-service-app/file-logs/hcmp-service-app.log  file contains ssl errors similar to:   2022-08-25T20:06:43.989Z ERROR hcmp-service [host='hcmp-service-app-xxxxxxx-xxxx' thread='Thread-56' user='' org='<org_id>' trace='<trace_id>' parent='<parent_id>' span='<span_id>'] c.v.a.h.a.common.AlertEnu...