This rule ensures all EC2 instances are placed within a Virtual Private Cloud.
Rule | EC2 instances should be in a VPC |
Framework | FedRAMP Low Revision 4 |
Severity | ✔ High |
Rule Description
This rule ensures that all EC2 instances are deployed within a Virtual Private Cloud (VPC) for compliance with FedRAMP Low Revision 4. The usage of a VPC provides network isolation, security groups, and other network-level controls, enhancing the security and compliance posture of the EC2 instances.
Troubleshooting Steps
Verify if the EC2 instance is currently deployed within a VPC:
If the instance is not within a VPC, follow the remediation steps below to ensure compliance with the FedRAMP Low Revision 4 rule.
Remediation Steps
Prerequisites
Before proceeding with the remediation steps, ensure you have the necessary permissions to perform the following actions:
Step 1: Create a VPC (if not already created)
If you don't have an existing VPC, follow these steps to create a new VPC:
Step 2: Assign the EC2 instance to the VPC
To assign an EC2 instance to the VPC you just created or ensure it is within an existing VPC, follow these steps:
Step 3: Verify the VPC assignment
After assigning the EC2 instance to the VPC, ensure that the changes have taken effect:
AWS CLI Commands
If you prefer using the AWS CLI to perform the remediation steps mentioned above, here are the equivalent CLI commands:
aws ec2 create-vpc --cidr-block <CIDR_BLOCK>
aws ec2 modify-instance-attribute --instance-id <INSTANCE_ID> --vpc-id <VPC_ID>
Make sure to replace
<CIDR_BLOCK>
, <INSTANCE_ID>
, and <VPC_ID>
with the appropriate values specific to your environment.Conclusion
By following the remediation steps mentioned above, you can ensure that all EC2 instances are deployed within a VPC, meeting the requirements for FedRAMP Low Revision 4 compliance.