Skip to main content

Triage and Remediation

Remediation

Using Console

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
  2. From the navigation bar, select the Region.
  3. From the navigation pane, select EC2 Dashboard.
  4. In the upper-right corner of the page, choose Account Attributes, Data protection and security.
  5. Choose Manage.
  6. Select Enable. You keep the AWS managed key with the alias alias/aws/ebs created on your behalf as the default encryption key, or choose a symmetric customer managed encryption key.
  7. Choose Update EBS encryption.

  1. To view the encryption by default setting a. For a specific Region
    b.For all Regions in your account
  2. To enable encryption by default a. For a specific Region
    b. For all Regions in your account
To enable encryption by default for a region using Python, you can use the boto3 library to interact with AWS resources. Here’s a Python script equivalent to the steps mentioned:
Replace 'your-region' with the AWS region where you want to enable default encryption. You can find a list of AWS region codes here.Make sure you have appropriate AWS credentials configured either through environment variables, AWS CLI configuration, or IAM roles assigned to your EC2 instance if you’re running this script on an EC2 instance.
This mirrors aws ec2 enable-ebs-encryption-by-default for the configured region: it is regional, only affects new volumes and snapshots, and does not retroactively encrypt existing volumes (which must be handled manually as described in the warning).terraform plan should show creation or update of aws_ebs_encryption_by_default.this with enabled changing to true.