Ensure Lambda function does not have Admin privileges
Error: Lambda function has Admin privileges
Bridgecrew Policy ID: BC_AWS_SERVERLESS_1
Lambda function has Admin privileges
AWS Lambda permissions are determined by the IAM execution role associated with the function. With an elevated execution role, an attacker can control the privileges that your Lambda function has.
We recommend you grant the IAM execution role the necessary permissions that your Lambda function needs, instead of providing administrative permissions.
Fix - Runtime
To change the policy using the AWS Console, follow these steps:
- Log in to the AWS Management Console at https://console.aws.amazon.com/.
- Open the IAM console.
- In the navigation panel, select Roles.
- Enter the Lambda execution role.
- Select the IAM execution role returned in the result set.
- Navigate to the IAM role configuration page, select the Permissions tab in the bottom panel.
- To access the policy 7. document (JSON format) in the Policy name column, click the attached IAM policy name.
- Inside the JSON panel, If the elements values are set to "*" and the Effect is set to Allow, remove them.
Updated almost 2 years ago