← All posts

Least privilege without the headache

21 September 2022 · 1 min read
#aws#iam#security

"Give it admin, we'll tighten it later" is how most cloud accounts end up insecure. Later never comes.

What works for me instead:

  • Start from nothing and add. Run the task, read the "access denied" error, add exactly that permission. Slow the first time, fast after that.
  • Use roles, not users with keys. Things running in the cloud should assume a role. Long-lived access keys are the thing that leaks.
  • Scope to resources. "Can read this one bucket" is far safer than "can read S3".
  • Guardrails at the top. Organisation-level rules that nobody can override, like "no one turns off audit logging", catch the mistakes individual policies miss.
  • Check what's actually used. The access history shows permissions that were granted but never used. Remove them.

Security people call it least privilege. I think of it as: if this got stolen, how bad would it be?

T
Written by Teza Wynn Htut

Cloud and infrastructure engineer in Auckland. I write down the fixes and lessons from things I build, and make tutorial videos on YouTube.

Watch on YouTube