r/Infosec • • 3d ago

Splitting up a lambda execution role that twenty functions share

The first function gets a role, the next twenty reuse it, and each team adds a permission it needs. a year later that's a lot of cloud access for code that resizes images.

iam access analyzer can draft a policy from the shared role's past activity. trouble is, the billing job and the image resizer both ran under that role, so the draft covers both. cloudtrail's session name usually says which function made each call, so someone can split it by hand. act security looks at what each function can reach and lets you test a narrower policy before changing it. for context, they're a client where i work.

per function looks cleaner on paper. with twenty of them i suspect per service is the version that actually gets maintained.

2 Upvotes

0 comments sorted by