More Info:

Any publicly accessible AWS Lambda functions should be identified and their access policy should be updated in order to protect against unauthorized users that are sending requests to invoke these functions.

Risk Level

Medium

Address

Security

Compliance Standards

HIPAA, PCIDSS, NIST, SOC2, HITRUST, AWSWAF, NISTCSF

Triage and Remediation

Remediation

Here are the step-by-step instructions to remediate the issue of publicly accessible Lambda functions in AWS console:

  1. Log in to your AWS Management Console.
  2. Navigate to the AWS Lambda service.
  3. Select the Lambda function that you want to remediate.
  4. Click on the “Configuration” tab.
  5. Scroll down to the “Network” section.
  6. Under “Network”, you will see the “Lambda function” section. Click on the “Edit” button.
  7. You will see the “Configure Function” page. Under the “General configuration” section, you will see the “VPC” and “Public network access” options.
  8. Select the VPC that the Lambda function should be associated with.
  9. Under “Public network access”, select “Disable” to prevent the Lambda function from being publicly accessible.
  10. Click on the “Save” button to save the changes.

Once you have completed these steps, your Lambda function will no longer be publicly accessible and will only be accessible within the specified VPC.

Additional Reading: