How fine-grained are your IAM service accounts?

How fine-grained are your IAM service accounts?


Related discussions:

The desired end state is to basically not have IAM users anymore.

Humans should authenticate with some kind of federated SSO and assume roles based on their role within the company and the amount of permission they need to do their job.

Machines and services should use IAM profiles to assume roles. Each human and each service should have a unique IAM role that only it assumes, and that only grants the permissions it actually needs to function.

I would also suggest managing these profiles as code, with cloudformation, terraform, or whatever else you’re already using.

In general we try to keep the same level of granularity that already exists for machines and people. If a machine is compromised then anything running on that machine is already within the blast radius, so you might as well run all of its scripts/jobs with the same account. More granular access is given for machines that are more likely to be compromised (ones running, say, ImageMagick on user provided images).

If the jobs don’t take user input or highly unlikely to be compromised based on how they process it, I’d generally give them the same rights as the operators that provision and run it. In this case your blast radius is the access rights that your developers/admins have, and there’s no sense making them constantly tweak access to services when the most likely route of compromise is a rogue or hacked admin.

We use roles for everything and try not to have any actual users. Unique roles for each service with minimal permissions.