Cloud Defense Logo

Products

Solutions

Company

Book A Live Demo

Rule: EC2 Instances Should Be in a VPC

This rule ensures that all EC2 instances are placed within a Virtual Private Cloud (VPC) for enhanced security and network isolation.

RuleEC2 instances should be in a VPC
FrameworkNIST 800-53 Revision 4
Severity
High

Rule: EC2 instances should be in a VPC for NIST 800-53 Revision 4

Description

The National Institute of Standards and Technology (NIST) Special Publication 800-53 Revision 4 provides a comprehensive set of security controls for federal information systems. One of the requirements outlined in this publication is to ensure that all EC2 instances are deployed within a Virtual Private Cloud (VPC) environment. This rule ensures improved network security, isolation, and control over your EC2 instances.

Troubleshooting Steps

  1. 1.
    Check if the EC2 instance is already within a VPC by navigating to the AWS Management Console.
  2. 2.
    Open the EC2 service and select "Instances" from the left-hand menu.
  3. 3.
    Locate the instance in question and check the "VPC ID" column. If the value is not empty, the instance is already in a VPC.
  4. 4.
    If the instance is not within a VPC, proceed with the remediation steps.

Remediation Steps

  1. 1.
    Log in to the AWS Management Console and open the EC2 service.
  2. 2.
    Select "Instances" from the left-hand menu.
  3. 3.
    Identify the EC2 instance(s) that need to be placed within a VPC and note down their instance IDs.
  4. 4.
    Create a VPC by going to the "VPC" service from the AWS Management Console.
  5. 5.
    Click on "Create VPC" and follow the prompts to create a VPC with the desired configuration.
  6. 6.
    Once the VPC is created, go back to the EC2 service and select "Instances" again.
  7. 7.
    Choose the EC2 instance you want to move to the VPC and click on the "Actions" button at the top.
  8. 8.
    From the dropdown menu, select "Networking" and then "Change instance security groups".
  9. 9.
    In the "Assign a new security group" section, select the appropriate VPC in the "VPC" dropdown menu.
  10. 10.
    Choose the desired security group(s) and click on the "Assign security groups" button.
  11. 11.
    Verify that the instance has been successfully moved to the VPC by checking the "VPC ID" column in the EC2 instances list.

Code

There is no specific code implementation required for this rule. The steps mentioned above can be followed using the AWS Management Console.

Additional Notes

  • Placing EC2 instances within a VPC provides better security by allowing you to define granular network access controls using security groups and network ACLs.
  • VPCs offer better network isolation, preventing unauthorized access from external sources.
  • By grouping EC2 instances within a VPC, you can centralize network management and routing for better control and visibility.
  • Ensure that your VPC is properly configured with the appropriate subnets, route tables, and network ACLs to meet your security requirements.

Is your System Free of Underlying Vulnerabilities?
Find Out Now