service resource class. cls = self.resource_factory.load_from_definition( resource_name=service_name, single_resource_json_definition=resource_model['service'], service_context=service_context ) return cls(client=client) session.py (https://github.com/boto/boto3/blob/develop/boto3/session.py) def load_from_definition(self, resource_name, single_resource_json_definition, service_context): (略) # Create the name based on the requested service and resource cls_name = resource_name if service_context.service_name == resource_name: cls_name = 'ServiceResource' cls_name = service_context.service_name + '.' + cls_name base_classes = [ServiceResource] (略) return type(str(cls_name), tuple(base_classes), attrs) s3 = boto3.resource('s3')