We thought our cross-account Lambda setup was secure, but a single misconfigured IAM role put our entire infrastructure at risk. This is the story of how we discovered the 'Confused Deputy' problem and what we did to fix it. Introduction to the Confused Deputy Problem The 'Confused Deputy' problem is a security risk that arises when a service or application is granted excessive permissions, allowing it to perform actions on behalf of another entity without proper authorization. This issue can be particularly problematic in AWS, where IAM roles and policies are used to manage access to resources.…