def METHOD_NAME(client):
    """
    A node template that defines a set of encrypted EC2 volume backed instances
    """
    def _attempt_delete_node_template(client, node_template,
                                      timeout=DEFAULT_TIMEOUT,
                                      sleep_time=.5):
        start = time.time()
        while node_template:
            if time.time() - start > timeout:
                raise AssertionError(
                    "Timed out waiting for node template %s to get deleted"
                    % node_template["name"])
            time.sleep(sleep_time)
            client.reload(node_template)
            try:
                client.delete(node_template)
                break
            except ApiError:
                pass
            except Exception as e:
                raise e
    ec2_cloud_credential_config = {"accessKey": AWS_ACCESS_KEY_ID,
                                   "secretKey": AWS_SECRET_ACCESS_KEY}
    ec2_cloud_credential = client.create_cloud_credential(
        amazonec2credentialConfig=ec2_cloud_credential_config
    )
    amazonec2Config = {
        "instanceType": "t3a.medium",
        "region": AWS_REGION,
        "rootSize": "16",
        "securityGroup": [AWS_SG],
        "sshUser": "ubuntu",
        "subnetId": AWS_SUBNET,
        "usePrivateAddress": False,
        "volumeType": "gp2",
        "vpcId": AWS_VPC,
        "zone": AWS_ZONE,
        "encryptEbsVolume": True
    }
    node_template = client.create_node_template(
        amazonec2Config=amazonec2Config,
        name=random_name(),
        useInternalIpAddress=True,
        driver="amazonec2",
        engineInstallURL=engine_install_url,
        cloudCredentialId=ec2_cloud_credential.id
    )
    node_template = client.wait_success(node_template)
    yield node_template
    _attempt_delete_node_template(client, node_template)