Ce produit n'est pas pris en charge par le site Datadog que vous avez sélectionné. ().
Cette page n'est pas encore disponible en français, sa traduction est en cours. Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.
Block device volumes in EC2 launch configurations must be encrypted to protect data at rest and prevent exposure of snapshots or AMIs if storage media is compromised.
For Ansible tasks using the community.aws.autoscaling_launch_config or autoscaling_launch_config modules, ensure the volumes list is defined and each volume entry sets encrypted: true (Ansible yes is also acceptable) under ec2_lc.volumes. Ephemeral (instance-store) volumes do not support encryption and are excluded. This rule flags launch configurations missing the volumes property, any volume entries without an encrypted property, or volumes where encrypted is explicitly false.
Example secure configuration for an Ansible autoscaling_launch_config task:
- name:Create launch configuration with encrypted volumescommunity.aws.autoscaling_launch_config:name:my-launch-configimage_id:ami-0123456789abcdef0instance_type:t3.mediumvolumes:- device_name:/dev/xvdavolume_size:50volume_type:gp2encrypted:truedelete_on_termination:yes
Compliant Code Examples
- name:note that encrypted volumes are only supported in >= Ansible 2.4 v4community.aws.autoscaling_launch_config:name:specialimage_id:ami-XXXkey_name:defaultsecurity_groups:[group, group2]instance_type:t1.microvolumes:- device_name:/dev/sda1volume_size:100volume_type:io1iops:3000delete_on_termination:trueencrypted:yes- name:note that encrypted volumes are only supported in >= Ansible 2.4 v5community.aws.autoscaling_launch_config:name:specialimage_id:ami-XXXkey_name:defaultsecurity_groups:[group, group2]instance_type:t1.microvolumes:- device_name:/dev/sda1volume_size:100volume_type:io1iops:3000delete_on_termination:trueencrypted:yes
Non-Compliant Code Examples
- name:note that encrypted volumes are only supported in >= Ansible 2.4community.aws.autoscaling_launch_config:name:specialimage_id:ami-XXXkey_name:defaultsecurity_groups:['group','group2']instance_type:t1.microvolumes:- device_name:/dev/sda1volume_size:100volume_type:io1iops:3000delete_on_termination:trueencrypted:no- name:note that encrypted volumes are only supported in >= Ansible 2.4 v2community.aws.autoscaling_launch_config:name:specialimage_id:ami-XXXkey_name:defaultsecurity_groups:['group','group2']instance_type:t1.microvolumes:- device_name:/dev/sda1volume_size:100volume_type:io1iops:3000delete_on_termination:true- name:note that encrypted volumes are only supported in >= Ansible 2.4 v3community.aws.autoscaling_launch_config:name:specialimage_id:ami-XXXkey_name:defaultsecurity_groups:['group','group2']instance_type:t1.micro
1
2
rulesets:- Ansible / AWS # Rules to enforce / AWS.
Request a personalized demo
Commencer avec Datadog
Ask AI
AI-generated responses may be inaccurate. Verify important info.