Ensure that there is no wildcard action in Lambda permission

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

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

GSL LOGIC

AWS_Lambda_Permission should not have Action='*'

REMEDIATION

From CFT
Set AWS::Lambda::Permission Action property to a least permission as per the requirement

References

  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