Ensure that there is no wildcard principal in Lambda permission

Lambda permission should not allow action on any principal as it violates the principle of least privilege.

Risk Level: High
Cloud Entity: AWS Lambda
CloudGuard Rule ID: D9.CFT.IAM.12
Covered by Spectral: Yes
Category: Compute


AWS_Lambda_Permission should not have Principal='*'


From CFT
Set AWS::Lambda::Permission Principal property to a specific principal as per the requirement


  1. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html
  2. https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege

AWS Lambda

AWS Lambda lets you run code without provisioning or managing servers. You pay only for the compute time you consume - there is no charge when your code is not running.

With Lambda, you can run code for virtually any type of application or backend service - all with zero administration. Just upload your code and Lambda takes care of everything required to run and scale your code with high availability. You can set up your code to automatically trigger from other AWS services or call it directly from any web or mobile app.

Compliance Frameworks

  • AWS CloudFormation ruleset