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. Ensure that all your Amazon Lambda functions are configured to allow access only to trusted AWS accounts in order to protect against unauthorized cross account access (i.e. unknown function invocation requests).
We recommend you grant the IAM execution role the necessary permissions that your Lambda function needs, instead of providing administrative permissions.
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 Amazon Lambda console.
- Navigate to the AWS Lambda section, select Functions.
- For the function that you want to examine and access its configuration page, click the function's name.
- Select the Triggers tab, then click View function policy. The panel with the policy used to manage the function invocation permissions will expand.
- Inside the Lambda function policy box, identify the AWS account ARN.
- Remove AWS account ARN that grants cross account access.
Updated about 1 year ago