When a Lambda function is created, it's automatically associated with a default security group. However, this default security group allows all inbound traffic and should not be used in a production environment. It is important to ensure that Lambda functions are not using the default security group to prevent any potential security risks.
To ensure default security groups are not used by Lambda, follow these steps:
- Open the Lambda console and navigate to the Functions page.
- Select the function for which you want to modify security groups.
- Scroll down to the Network section and click on the name of the VPC to which your function is attached.
- In the VPC configuration page, select the security groups that you want to use for your Lambda function.
- Remove any default security groups that are listed in the selected security groups.
- Save the changes.
Note: Remediation steps provided by Lightlytics are meant to be suggestions and guidelines only. It is crucial to thoroughly verify and test any remediation steps before applying them to production environments. Each organization's infrastructure and security needs may differ, and blindly applying suggested remediation steps without proper testing could potentially cause unforeseen issues or vulnerabilities. Therefore, it is strongly recommended that you validate and customize any remediation steps to meet your organization's specific requirements and ensure that they align with your security policies and best practices.