AWS has this "automatic encryption" setting that I'd like to turn on for my account: https://aws.amazon.com/premiumsupport/knowledge-center/ebs-automatic-encryption/ .
I've spent a while poking around, and I cannot figure out how to enable that setting with CDK. Is it possible?
Possibly relevant links from my research:
Is it possible to share code?? I guess you need to do something like below (btw this is python code)
host = ec2.BastionHostLinux(self, "BastionHost",
vpc=vpc,
block_devices=[ec2.BlockDevice(
device_name="EBSBastionHost",
volume=ec2.BlockDeviceVolume.ebs(10,
encrypted=True
)
)]
)
look at 'encrypted=True' option, which will encrypt your EBS volumes.
Reference: https://docs.aws.amazon.com/cdk/api/v1/python/aws_cdk.aws_ec2/EbsDeviceOptions.html
(Not sure if this was your requirement)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.