Rapid fire: what are the three questions you ask before running any destructive Python script in production?
BeginnerConceptBest practices & rapid-fire commands
Answer
- What will it touch? Run it with
--dry-run(and EC2DryRun=Truewhere available) and read the plan, including the account (sts get-caller-identity) and region. - Can I undo it? Snapshots, backups, versioning, or a documented rollback exist before the run.
- What limits the blast radius? Scoped IAM role, explicit filters (tags, account, region), a maximum-items safety cap, and confirmation for counts above a threshold.
Interviewers ask this to see whether you treat automation as production code.
More on Best practices & rapid-fire commands
What does a production-quality automation script always include?IntermediateHow do you handle configuration in a Python tool?IntermediateWhat are the most common security mistakes in Python ops code?AdvancedBash or Python for this task: how do you decide?BeginnerRapid fire: set up a project environment from scratch.BeginnerRapid fire: one-liners useful during an incident.Intermediate