boto/boto3 · error · NotImplementedError

Unsupported source type

Error message

Unsupported source type: {source}

What it means

create_request_parameters builds request params from a request model by switching on param.source. Known sources are 'identifier', 'data', 'string', 'integer', 'boolean', and 'input'. Anything else hits the else branch and raises NotImplementedError('Unsupported source type: {source}'). This indicates the resource model contains a source kind that this boto3 version does not know how to translate.

Solutions

  1. Align boto3 and botocore versions (pip install --upgrade boto3 botocore) so the source type is supported.
  2. If using a custom model, change the member's source to a supported value or implement handling.
  3. Downgrade botocore to match the installed boto3 if you must pin versions.

Example fix

# before
# pip install boto3==1.x botocore==1.y  # skew
# after
pip install --upgrade boto3 botocore
Defensive patterns

Strategy: retry

Validate before calling

import boto3, botocore
from packaging.version import Version
# Ensure boto3 is compatible with the installed botocore data files
compat = boto3.__version__ in botocore.__boto3_version_compat__ if hasattr(botocore, '__boto3_version_compat__') else True
assert compat, 'boto3/botocore version skew detected'

Try / catch

try:
    session.resource('service-name')
except NotImplementedError as e:
    if 'Unsupported source type' in str(e):
        import subprocess
        subprocess.check_call(['pip', 'install', '--upgrade', 'boto3', 'botocore'])
    raise

Prevention

When it happens

Trigger: Loading or invoking a resource action whose request model declares an unknown source type; typically triggered by a newer botocore model than the installed boto3 understands, or a hand-edited model.

Common situations: Version skew between boto3 and botocore (boto3 older than botocore data files); using a patched/custom service model with a non-standard source.

Related errors


AI-assisted analysis of boto/boto3@6e10b029c1 (2026-08-11). Data as JSON: /api/errors/a710bbf5cb677d0d. Report an issue: GitHub.

Appendix: 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 6e10b029c1)