I'm using the java SDK to spin up instances and it's working well. On issue is that the volume is 8GB
RunInstancesRequest runInstancesRequest = new RunInstancesRequest();
runInstancesRequest.withImageId(AMI_ID).withInstanceType(INSTANCE_TYPE).withMinCount(1).withMaxCount(1)
.withKeyName(KEY_NAME).withSecurityGroups(SECURITY_GROUP).withMonitoring(true);
RunInstancesResult runInstancesResult = ec2.runInstances(runInstancesRequest);
There doesn't seem to be anything in the RunInstancesRequest
class but withBlockDeviceMappings
seems to create a separate volume.
How do you specify the size of the volume?
答案 0 :(得分:1)