Ensure lambda functions are set up within a VPC for enhanced security and control.
Rule | Lambda functions should be in a VPC |
Framework | GxP 21 CFR Part 11 |
Severity | ✔ Low |
Rule/Policy Description: Lambda functions should be in a VPC for GxP 21 CFR Part 11 compliance.
Lambda functions, which are serverless functions offered by AWS, should be deployed within a Virtual Private Cloud (VPC) for organizations operating under GxP (Good Practice) guidelines and compliance with 21 CFR Part 11 regulations. This ensures enhanced security and control over data handling and processing within the lambda function environment.
Troubleshooting Steps (if applicable):
Necessary Codes (if applicable):
No specific codes are required for this rule. However, here is an example of how to create a lambda function within a VPC using AWS SDK for Node.js:
const AWS = require('aws-sdk');
const lambda = new AWS.Lambda();
const params = {
Code: { /* Lambda function code */ },
FunctionName: 'myLambdaFunction',
Handler: 'index.handler',
Role: 'arn:aws:iam::123456789012:role/lambda-role',
Runtime: 'nodejs14.x',
VpcConfig: {
SubnetIds: ['subnet-12345678', 'subnet-98765432'],
SecurityGroupIds: ['sg-12345678']
}
};
lambda.createFunction(params, function(err, data) {
if (err) console.log(err, err.stack);
else console.log(data);
});
Make sure to replace the subnet and security group IDs with the appropriate values from your VPC.
Step-by-Step Guide for Remediation:
Note: It is recommended to consult with compliance and security experts familiar with GxP and 21 CFR Part 11 requirements to ensure proper configuration and adherence to regulations.