boto/boto3 · error · ResourceNotExistsError

The ' ' resource does not exist. The available resources…

Error message

The '{service_name}' resource does not exist.
The available resources are:
   - {available_services}
Consider using a boto3.client('{service_name}') instead of a resource for '{service_name}'

What it means

`ResourceNotExistsError` is raised when `Session.resource(service_name)` cannot find a high-level resource model for the requested service in the bundled `resources-1` data — i.e. boto3 ships a low-level client for the service but no resource layer (or the service name is unknown entirely). The message lists available resources and notes whether a client exists, steering you toward `boto3.client(...)`. Resources are only generated for a subset of AWS services.

Solutions

  1. Switch to the low-level client for that service: `client = boto3.client('cloudfront')`.
  2. Check the catalog: `boto3.session.Session().get_available_resources()` and use only those names with `resource()`.
  3. Upgrade boto3 — a resource model may have been added since your installed version.
  4. Correct the service-name spelling against `get_available_services()`.

Example fix

# before
boto3.resource('cloudfront')  # ResourceNotExistsError

# after
boto3.client('cloudfront')
# verify which services have a resource layer
import boto3
print(boto3.session.Session().get_available_resources())
Defensive patterns

Strategy: validation

Validate before calling

def get_handle(session, service, use_resource=True):
    if use_resource and service in session.get_available_resources():
        return session.resource(service)
    return session.client(service)

# usage: get_handle(boto3.session.Session(), 'cloudfront')  # -> client

Type guard

def has_resource(session, service) -> bool:
    return service in session.get_available_resources()

Try / catch

from boto3.exceptions import ResourceNotExistsError
try:
    handle = boto3.resource(service)
except ResourceNotExistsError:
    handle = boto3.client(service)

Prevention

When it happens

Trigger: Calling `boto3.resource('cloudfront')`, `boto3.resource('route53')`, or any other service for which no resource model exists; misspelling a service name (`boto3.resource('s3bucket')`); using `Session().resource(name)` on a name that has a client but no resource.

Common situations: Assuming every AWS service has a resource interface; copy-pasting a service name from the client docs into a `resource()` call; a typo in a service-name constant; an old boto3 that predates a newer service's resource model.

Related errors


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

Appendix: source

Thrown at boto3/session.py:433

            a region_name value passed explicitly to the method.  If
            user_agent_extra is specified in the client config, it overrides
            the default user_agent_extra provided by the resource API. See
            `botocore config documentation
            <https://docs.aws.amazon.com/botocore/latest/reference/config.html>`_
            for more details.

        :return: Subclass of :py:class:`~boto3.resources.base.ServiceResource`
        """
        try:
            resource_model = self._loader.load_service_model(
                service_name, 'resources-1', api_version
            )
        except UnknownServiceError:
            available = self.get_available_resources()
            has_low_level_client = (
                service_name in self.get_available_services()
            )
            raise ResourceNotExistsError(
                service_name, available, has_low_level_client
            )
        except DataNotFoundError:
            # This is because we've provided an invalid API version.
            available_api_versions = self._loader.list_api_versions(
                service_name, 'resources-1'
            )
            raise UnknownAPIVersionError(
                service_name, api_version, ', '.join(available_api_versions)
            )

        if api_version is None:
            # Even though botocore's load_service_model() can handle
            # using the latest api_version if not provided, we need
            # to track this api_version in boto3 in order to ensure
            # we're pairing a resource model with a client model
            # of the same API version.  It's possible for the latest
            # API version of a resource model in boto3 to not be

View on GitHub (pinned to 6e10b029c1)