Developers in a sandbox account accidentally ran a $9,000 GPU instance for two weeks. How do you add guardrails without blocking experimentation?
BeginnerScenarioCloud IAM and Compliance
Answer
Situation read → Cost is a security concern too (cryptojacking looks the same). Sandboxes need limits, not locks.
What I'd do →
- AWS Budgets with alerts at 50/80/100% and a budget action that applies a deny policy at the limit.
- SCP on the Sandbox OU denying large or GPU instance types except via approval.
- Auto-cleanup: nightly job (aws-nuke or Lambda) deleting resources older than N days without a
keeptag. - Cost anomaly detection alerts to the account owner.
Why → People can still experiment, but nothing expensive keeps running without anyone noticing.
Interview tip → Link cost anomalies to compromised-account detection.
More on Cloud IAM and Compliance
You find an IAM policy with `"Action": "*", "Resource": "*"` attached to an application role. How do you right-size it?BeginnerYour company has 40 AWS accounts with no central controls. How do you set up preventive guardrails?IntermediateGuardDuty reports `UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWS`. What happened and what do you do?AdvancedYour company must pass SOC 2 Type II in six months. What does DevOps own, and how do you automate evidence?IntermediateA partner needs access to one S3 bucket in your account. How do you set up cross-account access safely?IntermediateSomeone logged in with the AWS root user last night. How do you react, and how should you have known?Beginner