This rule ensures that VPC Elastic IPs are properly associated to maintain network security.
Rule | VPC EIPs should be associated with an EC2 instance or ENI |
Framework | NIST 800-171 Revision 2 |
Severity | ✔ High |
Rule Description:
VPC Elastic IP (EIP) addresses should only be associated with EC2 instances or Elastic Network Interfaces (ENI) to comply with the NIST 800-171 Revision 2 security standard. An Elastic IP address is a static, public IPv4 address that can be associated with resources in your VPC. By ensuring that every EIP is connected to a valid EC2 instance or ENI, you mitigate the risk of unauthorized access and ensure proper security controls over your VPC.
Troubleshooting Steps:
If an EIP is found to be unassociated with any EC2 instance or ENI, here are the troubleshooting steps to rectify the issue:
Identify unassociated EIPs:
Determine the reason for unassociation:
Associate EIP with an EC2 instance or ENI:
Necessary Codes:
There are no specific codes needed to enforce the association of VPC EIPs with EC2 instances or ENIs. However, you can use the AWS CLI (Command Line Interface) to automate the troubleshooting steps mentioned above.
To list unassociated EIPs using AWS CLI:
aws ec2 describe-addresses --filter "Name=instance-id, Values=[]"
To associate an EIP with an EC2 instance or ENI using AWS CLI:
aws ec2 associate-address --instance-id <instance-id> --public-ip <EIP-address>
Make sure to replace
<instance-id>
with the actual ID of the EC2 instance and <EIP-address>
with the unassociated EIP for association.Remediation Steps:
To ensure compliance with the VPC EIP association rule, follow these step-by-step guide for remediation:
Identify unassociated EIPs:
Review unassociated EIPs:
Associate EIPs with EC2 instances or ENIs:
Repeat the procedure for all other unassociated EIPs.
Verify the association:
By following these steps, you can ensure that all VPC EIPs are correctly associated with EC2 instances or ENIs, meeting the compliance requirement of NIST 800-171 Revision 2.