Automate EBS cleanup
diff --git a/tests/letstest/multitester.py b/tests/letstest/multitester.py
index 17740cde820..0ae9636d428 100644
--- a/tests/letstest/multitester.py
+++ b/tests/letstest/multitester.py
@@ -128,6 +128,7 @@ def make_instance(instance_name,
                   userdata=""): #userdata contains bash or cloud-init script
 
     new_instance = EC2.create_instances(
+        BlockDeviceMappings=_get_block_device_mappings(ami_id),
         ImageId=ami_id,
         SecurityGroups=security_groups,
         KeyName=keyname,
@@ -151,38 +152,21 @@ def make_instance(instance_name,
             raise
     return new_instance
 
-def terminate_and_clean(instances):
-    """
-    Some AMIs specify EBS stores that won't delete on instance termination.
-    These must be manually deleted after shutdown.
+def _get_block_device_mappings(ami_id):
+    """Returns the list of block device mappings to ensure cleanup.
+
+    This list sets connected EBS volumes to be deleted when the EC2
+    instance is terminated.
+
     """
-    volumes_to_delete = []
-    for instance in instances:
-        for bdmap in instance.block_device_mappings:
-            if 'Ebs' in bdmap.keys():
-                if not bdmap['Ebs']['DeleteOnTermination']:
-                    volumes_to_delete.append(bdmap['Ebs']['VolumeId'])
-
-    for instance in instances:
-        instance.terminate()
-
-    # can't delete volumes until all attaching instances are terminated
-    _ids = [instance.id for instance in instances]
-    all_terminated = False
-    while not all_terminated:
-        all_terminated = True
-        for _id in _ids:
-            # necessary to reinit object for boto3 to get true state
-            inst = EC2.Instance(id=_id)
-            if inst.state['Name'] != 'terminated':
-                all_terminated = False
-        time.sleep(5)
-
-    for vol_id in volumes_to_delete:
-        volume = EC2.Volume(id=vol_id)
-        volume.delete()
-
-    return volumes_to_delete
+    # Not all devices use EBS, but the default value for DeleteOnTermination
+    # when the device does use EBS is true. See:
+    # * https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-mapping.html
+    # * https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-template.html
+    return [{'DeviceName': mapping['DeviceName'],
+             'Ebs': {'DeleteOnTermination': True}}
+            for mapping in EC2.Image(ami_id).block_device_mappings
+            if not mapping.get('Ebs', {}).get('DeleteOnTermination', True)]
 
 
 # Helper Routines
@@ -370,10 +354,11 @@ def test_client_process(inqueue, outqueue):
 def cleanup(cl_args, instances, targetlist):
     print('Logs in ', LOGDIR)
     if not cl_args.saveinstances:
-        print('Terminating EC2 Instances and Cleaning Dangling EBS Volumes')
+        print('Terminating EC2 Instances')
         if cl_args.killboulder:
             boulder_server.terminate()
-        terminate_and_clean(instances)
+        for instance in instances:
+            instance.terminate()
     else:
         # print login information for the boxes for debugging
         for ii, target in enumerate(targetlist):

Part of #6056.

I have another piece to this locally which makes us terminating the instances more reliable, but I thought I'd split up the PR and first submit this which causes Amazon to automatically handle deleting EBS volumes when instances are shutdown.

The general approach here is described at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/RootDeviceStorage.html#Using_RootDeviceStorage. Doing something like this significantly speeds up cleanup and ensures we always cleanup storage because [EC2 only supports EBS and instance volumes](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#block-device-mapping-def) and [instance volumes cannot outlive the associated instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html#instance-store-lifetime).

Probably the easiest way to tests this is to run a test with `--killboulder` on the command line and wait for the test to finish or hit ctrl+c after you see "Waiting on Boulder Server". If you do that and wait a few minutes, you can then run `aws ec2 --profile <profile> describe-volumes` and if no one else is running tests on our account, the output should be empty.