Actually Getting to Least Privilege in AWS Lambda
Least Privilege is kind of like the Holy Grail of security. Everyone wants it, but it remains elusive. Those that have mounted serious efforts to achieve it have had varying degrees of success "Every program and every privileged user of the system should operate using the least amount of privilege necessary to complete the job."— Jerome Saltzer, Communications of the ACM Peter J. Denning, in his paper "Fault Tolerant Operating Systems" , set it in a broader perspective among four fundamental principles of fault tolerance. Dynamic assignments of privileges was earlier discussed by Roger Needham in 1972. 1,2 Okay so luminaries have written about it and that means it's probably a thing. But how to achieve it with AWS Lambda? Let's start with facing the biggest challenges in general: The effort required to pare down permissions to the minimum necessary is significant. As developers add features, policy enforcement just gets in their way, and using...