Cloud Defense Logo

Products

Solutions

Company

Book A Live Demo

Rule: EC2 Instances Should Be in a VPC

This rule ensures all EC2 instances are securely placed within a VPC.

RuleEC2 instances should be in a VPC
FrameworkNIST Cybersecurity Framework (CSF) v1.1
Severity
High

Rule Description:

The rule states that all EC2 instances should be deployed within a Virtual Private Cloud (VPC) to comply with the NIST Cybersecurity Framework (CSF) v1. The VPC provides a secure and isolated environment for EC2 instances, helping to protect sensitive data and prevent unauthorized access.

Troubleshooting Steps (if applicable):

  1. 1.

    Check if the EC2 instance is currently associated with a VPC. You can do this by selecting the instance in the AWS Management Console and inspecting the "Virtual Private Cloud (VPC)" field.

  2. 2.

    If the instance is not associated with a VPC, it needs to be migrated to a VPC. Follow the step-by-step guide below for the necessary steps.

  3. 3.

    If the instance is already associated with a VPC, ensure that the VPC is properly configured with appropriate security groups, network ACLs, and subnets according to your security requirements.

Necessary Codes (if applicable):

No specific code snippet is provided for this rule as it involves configuring the infrastructure and settings in the AWS Management Console or AWS CLI.

Step-by-Step Guide for Remediation:

  1. 1.

    Determine the desired VPC architecture: Decide whether you want to use the default VPC or create a new VPC.

  2. 2.

    Create a new VPC (if needed):

    • Go to the AWS Management Console.
    • Navigate to the VPC dashboard.
    • Click on "Create VPC".
    • Fill in the necessary details such as VPC name, IPv4 CIDR block, and any additional configurations based on your requirements.
    • Click on "Create" to create the new VPC.
  3. 3.

    Migrate EC2 instance to the VPC:

    • Go to the EC2 dashboard in the AWS Management Console.
    • Select the desired EC2 instance that is not associated with a VPC.
    • Right-click on the instance and choose "Instance State" > "Stop" to gracefully shut down the instance.
    • Once the instance is stopped, right-click on it again and choose "Instance Settings" > "Change Instance Type".
    • Review the availability zones in which your VPC is available and choose an instance type compatible with the VPC.
    • Click on "Apply" to save the changes.
    • Right-click on the instance and choose "Instance State" > "Start" to power on the instance.
    • After the instance is running, it will be associated with the newly created VPC.
  4. 4.

    Verify the association with the VPC:

    • Go to the EC2 dashboard in the AWS Management Console.
    • Select the previously migrated EC2 instance.
    • Verify that the "Virtual Private Cloud (VPC)" field displays the newly created VPC.
  5. 5.

    Repeat steps 2 to 4 for any other EC2 instances that are not associated with a VPC.

Conclusion:

By ensuring that all EC2 instances are deployed within a VPC, you comply with the NIST Cybersecurity Framework (CSF) v1. This helps to establish a secure network architecture, protecting confidential data and reducing the potential attack surface.

Is your System Free of Underlying Vulnerabilities?
Find Out Now