lacework-global-179
Lambda Function should not have Admin Privileges
Description
Lambda functions assume an execution role, which grants permissions to the function. Like IAM users, Lambda functions should be managed using the principle of least access.
Remediation
Login to the AWS Management Console.
Click Services.
Select Lambda.
On the left side, select functions.
Choose a function and click the Configuration tab.
Click Permissions.
Under Execution role - Role name, click on the role associated with the function.
Under Permissions policies, select and expand an attached policy to view in JSON format.
Locate policies with statements that have Resource and Action elements set to '*' and Effect set to 'Allow'.
Edit or delete the offending policy.
Repeat steps 8-10 for each attached policy.
Edit:
Click edit on the offending policy.
Edit the permissions so the policy no longer has admin privileges using either the Visual editor, or JSON tab.
Click Review policy.
Click Save changes.
Delete:
Check the box next to the offending policy.
Click Remove.
Click Delete.