Im AWS Java SDK 1.10.69, kann ich eine Instanz starten und EBS Volume-Zuordnungen für die Instanz angeben:AWS Java SDK: Angeben von KMS Key-ID für EBS
RunInstancesRequest runInstancesRequest = new RunInstancesRequest();
String userDataString = Base64.encodeBase64String(userData.toString().getBytes());
runInstancesRequest
.withImageId(machineImageId)
.withInstanceType(instanceType.toString())
.withMinCount(minCount)
.withMaxCount(maxCount)
.withKeyName(sshKeyName)
.withSecurityGroupIds(securityGroupIds)
.withSubnetId(subnetId)
.withUserData(userDataString)
.setEbsOptimized(true);
final EbsBlockDevice ebsBlockDevice = new EbsBlockDevice();
ebsBlockDevice.setDeleteOnTermination(true);
ebsBlockDevice.setVolumeType(VolumeType.Gp2);
ebsBlockDevice.setVolumeSize(256);
ebsBlockDevice.setEncrypted(true);
final BlockDeviceMapping mapping = new BlockDeviceMapping();
mapping.setDeviceName("/dev/sdb");
mapping.setEbs(ebsBlockDevice);
Es scheint, dass zur Zeit kann ich nur Aktivieren/deaktivieren Sie die Verschlüsselung auf dem Volume und geben Sie nicht an, welcher KMS-Kundenstammschlüssel für das Volume verwendet werden soll.
Gibt es einen Weg um dies?