def aws_function(settings, key: str, array: bool) ->str:
    """
    Internal imputation specifying one of AWS SDK functions based on type.

    This function specifies which AWS SDK function will be used to create
    JSONValue (either as single item to return or as part of array to return).

    Looked for in return->output and return->result settings and returns one or both
    depending on which is specified.

    Parameters
    ----------
    settings : typing.Dict
        YAML parsed to dict
    key : str
        Name of field to look for in type (either "output" or "result")
    array: bool
        Whether prefix should be tailored to array output (`As`) or item (`With`)

    Returns
    -------
    str:
        "" or "As<type>" or "With<type>" AWS function name

    """
    prefix = 'As' if array else 'With'
    type_mapping = {'int': 'Integer', 'long': 'Int64', 'double': 'Double'}
    if settings['return'][key] is None:
        return ''
    return prefix + type_mapping[settings['return'][key]['type'].lower()]
