Q: Your On-Demand EC2 costs are very high. How would you optimize?
1. Reserved Instances (RI) — commit to 1 or 3 years for 40-60% discount. Best for steady-state production workloads.
Want to master this scenario in a live sandbox? Stephane Maarek's AWS Certified DevOps Engineer Professional Masterclass on Udemy covers this exact problem with hands-on terminal drills.
🛠️ Production Runbook & Step-by-Step Resolution
Direct Answer: "When an interviewer asks how I troubleshoot this in AWS, I frame it through my hands-on production experience. When addressing this question, I walk the interviewer through our production incident runbook: isolating the blast radius, checking diagnostic logs and metrics, and applying a safe fix."
Initial Diagnostics & Root Cause Analysis
- Reserved Instances (RI) — commit to 1 or 3 years for 40-60% discount. Best for steady-state production workloads.
- Savings Plans — more flexible than RIs. Commit to $/hour spend, apply across any instance type.
- Spot Instances — up to 90% discount. For fault-tolerant workloads (batch jobs, CI/CD workers, stateless web tier).
- Right-sizing — use AWS Compute Optimizer. Many instances are over-provisioned.
Remediation & Permanent Safeguards
- Graviton instances — ARM-based (m7g, c7g) are 20-40% cheaper than x86 equivalents.
- Auto Scaling — scale in during off-hours. Don't run 10 instances at 2 AM if traffic drops to 1% of peak.
- S3 + CloudFront for static content — offload static serving from EC2.
- Reserved Instances (RI) — commit to 1 or 3 years for 40-60% discount. Best for steady-state produ...
- Savings Plans — more flexible than RIs. Commit to $/hour spend, apply across any instance type.
- Spot Instances — up to 90% discount. For fault-tolerant workloads (batch jobs, CI/CD workers, sta...
Senior hiring managers and bar raisers evaluate how you prioritize during outages. Avoid these common anti-patterns:
- Purging compromised IAM user credentials immediately prior to querying CloudTrail forensic event logs when configuring Demand costs high Deactivating a compromised key prevents abuse while preserving identity records for CloudTrail forensic queries to assess blast radius.
- Conflating local IAM Permissions Boundaries with organizational Service Control Policies (SCPs) when configuring Demand costs high SCPs define maximum permission guards at the AWS Organization level across accounts, whereas permission boundaries limit delegate privileges within a single account.
- Deploying single-AZ cloud infrastructure for production workloads without multi-AZ failover resilience when configuring Demand costs high Availability Zone hardware failures or localized network partitions cause complete service downtime when resources are not distributed across >=2 AZs.
- Jumping straight to SSH or instance restarts without reviewing CloudWatch metrics and AWS Systems Manager logs when configuring Demand costs high Senior SREs triage control plane and hypervisor metrics via CloudWatch and SSM Session Manager before executing invasive host-level actions.