def METHOD_NAME(input):
    metadata = Metadata()
    print('Connecting')
    ec2 = boto3.resource('ec2',region_name=metadata.region())
    print('STEP 1: Creating volume') # aws ec2 create-volume
    time_point = time.time()
    vol = ec2.create_volume(Size=to_gib(image_size(input)),
                            AvailabilityZone=metadata.availability_zone(),
                            VolumeType='gp2',
                            )
    print('Waiting for {}'.format(vol.id))
    wait_for(vol)
    print('STEP 1: Took {} seconds to create volume {}'.format(time.time() - time_point,vol.id))
    print('STEP 2: Attaching {} to {}'.format(vol.id, metadata.instance_id())) # aws ec2 attach-volume
    time_point = time.time()
    vol.attach_to_instance(InstanceId=metadata.instance_id(), Device='xvdf')
    while not os.path.exists('/dev/xvdf'):
        print('waiting for volume to attach')
        time.sleep(1)
    print('STEP 2: Took {} seconds to attach volume to instance {}'.format(time.time() - time_point,metadata.instance_id()))
    print('STEP 3: Copying image')
    time_point = time.time()
    copy_image(input, '/dev/xvdf')
    print('STEP 3: Took {} seconds to copy image'.format(time.time() - time_point))
    print('STEP 4; Detaching volume {}'.format(vol.id))
    time_point = time.time()
    vol.detach_from_instance()
    print('STEP 4: Took {} seconds to detach volume'.format(time.time() - time_point))
    print('STEP 5: Creating snapshot from {}'.format(vol.id)) # aws ec2 create-snapshot
    time_point = time.time()
    snap = vol.create_snapshot()
    wait_for(snap, 'completed')
    print('STEP 5: Took {} seconds to create snapshot {}'.format(time.time() - time_point,snap.id))
    print('STEP 6: Deleting volume {}'.format(vol.id))
    time_point = time.time()
    vol.delete()
    print('STEP 6: Took {} seconds to delete volume'.format(time.time() - time_point))
    print('Snapshot {} created\n'.format(snap))
    return snap.id