More Info:

Amazon Lambda functions should not share the same AWS IAM execution role in order to promote the Principle of Least Privilege (POLP) by providing each individual function the minimal amount of access required to perform its tasks.

Risk Level

High

Address

Security

Compliance Standards

SOC2

Triage and Remediation

Remediation

Sure! Here are the step-by-step instructions to remediate the misconfiguration “Multiple Functions Should Not Have The Same IAM Role” for AWS:

  1. Log in to your AWS Management Console.
  2. Navigate to the AWS Lambda service from the Services menu.
  3. Select the function that has the same IAM role as another function.
  4. Scroll down to the “Permissions” section and click on the IAM role name.
  5. This will take you to the IAM console. Click on the “Create Role” button.
  6. In the “Create Role” wizard, select “AWS service” as the trusted entity and “Lambda” as the service that will use this role.
  7. Click on the “Next: Permissions” button.
  8. In the “Attach permissions policies” section, select the policies that your function needs to run.
  9. Click on the “Next: Tags” button.
  10. Add any tags that you want to associate with this role (optional).
  11. Click on the “Next: Review” button.
  12. Give the role a name and description.
  13. Click on the “Create Role” button.
  14. Go back to the Lambda function and scroll down to the “Permissions” section.
  15. Click on the “Edit” button next to the “Execution role” field.
  16. Select the newly created IAM role from the list.
  17. Click on the “Save” button.

That’s it! You have now remediated the misconfiguration “Multiple Functions Should Not Have The Same IAM Role” for AWS. Repeat these steps for any other functions that have the same IAM role.

Additional Reading: