This rule states that Paravirtual EC2 instance types should not be used. Ensure compliance to enhance security measures.
Rule | Paravirtual EC2 instance types should not be used |
Framework | AWS Foundational Security Best Practices |
Severity | ✔ Medium |
Rule Description:
Paravirtual EC2 instance types should not be used for AWS Foundational Security Best Practices.
Description:
Paravirtual EC2 instances are an older generation of instances that utilize a different virtualization technology compared to the newer HVM (Hardware Virtual Machine) instances. The AWS Foundational Security Best Practices recommend using HVM instances for improved security and performance.
Troubleshooting steps:
If you identify that your EC2 instances are running on paravirtual virtualization, you can follow these troubleshooting steps to migrate to HVM instances:
Identify the current instance type:
Check compatibility:
Snapshot or backup important data:
Migrate to HVM instance:
Verify the new instance:
Optional - Terminate the old instance:
Necessary codes:
There are no specific codes provided as the migration process involves standard EC2 management tasks through the AWS Management Console or AWS CLI.
Remediation steps:
Follow these step-by-step commands to remediate the issue using AWS CLI:
Identify the current instance type:
aws ec2 describe-instances --instance-ids <instance-id> --query 'Reservations[*].Instances[*].[InstanceId, InstanceType]'
Check compatibility:
Migrate to HVM instance:
Stop the paravirtual instance:
aws ec2 stop-instances --instance-ids <instance-id>
Create an Amazon Machine Image (AMI) from the stopped instance:
aws ec2 create-image --instance-id <instance-id> --name "New HVM AMI" --description "AMI for HVM instance migration"
Launch a new instance using the HVM-compatible AMI:
aws ec2 run-instances --image-id <new-ami-id> --instance-type <hvm-instance-type> --key-name <key-pair-name>
Update any necessary configurations and ensure the proper working of your applications.
Verify the new instance:
Optional - Terminate the old instance:
aws ec2 terminate-instances --instance-ids <instance-id>
By following the above steps, you can migrate from paravirtual EC2 instance types to HVM instances, aligning with AWS Foundational Security Best Practices.