Interview Prep/Python for DevOps/AWS automation with boto3

Your script uses `boto3.resource("ec2")` and a new team member asks whether to keep using resources. What do you advise?

BeginnerScenarioAWS automation with boto3
Answer

Situation read → AWS has feature-frozen the resource interface.

What I'd do →

  1. Keep existing working code, but write new code with clients.
  2. Clients cover every API and new features; resources will not get new services or operations.
  3. Clients return plain dicts, which are easy to test with moto or Stubber and to type with boto3-stubs.

Why → Long-term maintainability and full API coverage.

Interview tip → Know that the resource interface is frozen; it often comes up.

All Python for DevOps questions Roadmap: Python for automation

More on AWS automation with boto3