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

  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.  

57 Tips Every Admin Should Know

Active Directory 1. To quickly list all the groups in your domain, with members, run this command: dsquery group -limit 0 | dsget group -members –expand 2. To find all users whose accounts are set to have a non-expiring password, run this command: dsquery * domainroot -filter “(&(objectcategory=person)(objectclass=user)(lockoutTime=*))” -limit 0 3. To list all the FSMO role holders in your forest, run this command: netdom query fsmo 4. To refresh group policy settings, run this command: gpupdate 5. To check Active Directory replication on a domain controller, run this command: repadmin /replsummary 6. To force replication from a domain controller without having to go through to Active Directory Sites and Services, run this command: repadmin /syncall 7. To see what server authenticated you (or if you logged on with cached credentials) you can run either of these commands: set l echo %logonserver% 8. To see what account you are logged on as, run this command: ...
  The Guardrails of Automation VMware Cloud Foundation (VCF) 9.0 has redefined private cloud automation. With full-stack automation powered by Ansible and orchestrated through vRealize Orchestrator (vRO), and version-controlled deployments driven by GitOps and CI/CD pipelines, teams can build infrastructure faster than ever. But automation without guardrails is a recipe for risk Enter RBAC and policy enforcement. This third and final installment in our automation series focuses on how to secure and govern multi-tenant environments in VCF 9.0 with role-based access control (RBAC) and layered identity management. VCF’s IAM Foundation VCF 9.x integrates tightly with enterprise identity providers, enabling organizations to define and assign roles using existing Active Directory (AD) groups. With its persona-based access model, administrators can enforce strict boundaries across compute, storage, and networking resources: Personas : Global Admin, Tenant Admin, Contributor, Viewer Projec...