boto/boto3 · error · NotImplementedError

Unsupported source type: {source}

Error message

Unsupported source type: {source}

What it means

Raised by create_request_parameters() in boto3/resources/params.py when a request parameter's source attribute is not one of the recognized values ('identifier', 'data', 'string', 'integer', 'boolean', 'input'). This is an internal/definition-level error: the source comes from the service resource JSON model, so hitting it means the model contains an unrecognized source type or the model/boto3 versions are out of sync. End users almost never trigger this through normal API usage.

Source

Thrown at boto3/resources/params.py:93

    for param in request_model.params:
        source = param.source
        target = param.target

        if source == 'identifier':
            # Resource identifier, e.g. queue.url
            value = getattr(parent, xform_name(param.name))
        elif source == 'data':
            # If this is a data member then it may incur a load
            # action before returning the value.
            value = get_data_member(parent, param.path)
        elif source in ['string', 'integer', 'boolean']:
            # These are hard-coded values in the definition
            value = param.value
        elif source == 'input':
            # This is provided by the user, so ignore it here
            continue
        else:
            raise NotImplementedError(f'Unsupported source type: {source}')

        build_param_structure(params, target, value, index)

    return params


def build_param_structure(params, target, value, index=None):
    """
    This method provides a basic reverse JMESPath implementation that
    lets you go from a JMESPath-like string to a possibly deeply nested
    object. The ``params`` are mutated in-place, so subsequent calls
    can modify the same element by its index.

        >>> build_param_structure(params, 'test[0]', 1)
        >>> print(params)
        {'test': [1]}

        >>> build_param_structure(params, 'foo.bar[0].baz', 'hello world')

View on GitHub (pinned to c7b4afac23)

Solutions

  1. Upgrade boto3 (and botocore) to matching, current versions so the resource model and code agree on source types.
  2. If using custom resource models, ensure all param.source values are among the recognized set.
  3. Downgrade botocore to a version compatible with your boto3 if upgrading is not possible.

Example fix

# no user code fix; environment fix
# before: mismatched boto3/botocore
pip install boto3==1.26.0 botocore==1.40.0  # mismatched

# after: aligned versions
pip install --upgrade boto3 botocore
Defensive patterns

Strategy: validation

Validate before calling

# Not preventable at call-site; validate environment instead.
import boto3, botocore
assert boto3.__version__ and botocore.__version__, 'boto3/botocore must be importable'
# Ensure versions are compatible (bundled botocore ships with boto3)
print(f'boto3={boto3.__version__} botocore={botocore.__version__}')

Try / catch

try:
    resource.action()
except NotImplementedError as e:
    if 'Unsupported source type' in str(e):
        # likely version mismatch; report and guide upgrade
        raise RuntimeError('boto3/botocore version mismatch; run pip install --upgrade boto3') from e
    raise

Prevention

When it happens

Trigger: Loading a resource model whose params include a source value not handled by the if/elif chain; using a custom or patched service model with a new source type that this boto3 version does not understand.

Common situations: Boto3/botocore version mismatch where a newer botocore data file introduces a source type; locally patched or custom resource definitions; very old boto3 against new botocore data.

Related errors


AI-assisted analysis of boto/boto3@c7b4afac23 (2026-08-04). Data as JSON: /data/errors/a710bbf5cb677d0d.json. Report an issue: GitHub.