This rule emphasizes the importance of restricting public access for Lambda functions.
Rule | Lambda functions should restrict public access |
Framework | GxP 21 CFR Part 11 |
Severity | ✔ Critical |
Rule Description:
The rule requires Lambda functions to restrict public access for GxP (Good Practice) 21 CFR (Code of Federal Regulations) Part 11 compliance. This ensures that Lambda functions that handle sensitive data or perform critical operations adhere to the security requirements outlined in the GxP 21 CFR Part 11 guidelines.
Rule Policy:
Lambda functions must have the necessary configurations to prevent public access and enforce GxP 21 CFR Part 11 compliance. Any publicly accessible Lambda functions should be restricted to reduce the risk of unauthorized access or data breaches.
Troubleshooting Steps:
Identify publicly accessible Lambda functions:
Review function permissions:
Update function policies:
Code Snippets:
aws lambda list-functions --region <region-name>
aws lambda get-policy --function-name <function-name> --region <region-name>
aws lambda add-permission --function-name <function-name> --region <region-name> \ --statement-id <unique-id> --action lambda:InvokeFunction --principal <account-id> \ --source-arn arn:aws:execute-api:<region-name>:<account-id>:<api-gateway-id>/*/POST/<path>
Remediation Steps:
Identify publicly accessible Lambda functions:
aws lambda list-functions
to obtain a list of all Lambda functions in your account.Review function permissions:
aws lambda get-policy --function-name <function-name>
for each Lambda function to view their current policies.Update function policies:
aws lambda add-permission
to update the function's policy.<function-name>
with the name of the Lambda function you want to modify, and <region-name>
with the appropriate AWS region.<unique-id>
for the statement ID.--principal
and --source-arn
parameters based on your specific requirements.Verify changes:
aws lambda get-policy --function-name <function-name>
to confirm that the policy has been updated successfully.Final Notes:
Adhering to the GxP 21 CFR Part 11 guidelines by restricting public access for Lambda functions helps maintain the security and compliance of sensitive data and critical operations. Regularly reviewing and updating function policies is necessary to mitigate the risk of unauthorized access and potential data breaches.