Ensure VPC flow logs are enabled to enhance network security and monitoring.
Rule | VPC flow logs should be enabled |
Framework | General Data Protection Regulation (GDPR) |
Severity | ✔ High |
Rule Description:
VPC flow logs should be enabled to comply with the General Data Protection Regulation (GDPR).
Troubleshooting Steps (if applicable):
If VPC flow logs are not enabled, follow the steps below to troubleshoot:
Configuration Code (if applicable):
Here is an example code snippet to enable VPC flow logs for a specific VPC:
aws ec2 create-flow-logs --resource-type VPC --resource-ids vpc-12345678 --traffic-type ALL --log-destination-type cloud-watch-logs --log-destination user-flow-logs --log-format-version 2
Remediation Steps:
Follow the step-by-step guide below to enable VPC flow logs:
CLI Command:
To enable VPC flow logs using AWS CLI, use the following command:
aws ec2 create-flow-logs --resource-type VPC --resource-ids <VPC_ID> --traffic-type ALL --log-destination-type cloud-watch-logs --log-destination <LOG_GROUP_NAME> --log-format-version 2
Replace
<VPC_ID>
with the actual VPC ID and <LOG_GROUP_NAME>
with the desired CloudWatch Logs group name.Note: Make sure you have the necessary permissions to execute the AWS CLI command.
By following the above steps and using the provided command, you will be able to enable VPC flow logs to comply with the General Data Protection Regulation (GDPR) requirements.