def METHOD_NAME(service_name: str, **kwargs):
    """Create an AWS resource of a certain service.
    Args:
        service_name: AWS resource name (e.g., 's3').
        kwargs: Other options.
    """
    if not hasattr(_local, 'resource'):
        _local.METHOD_NAME = {}
    # Using service name and kwargs as key
    sorted_kwargs = tuple(sorted(kwargs.items(), key=lambda x: x[0]))
    key = (service_name, sorted_kwargs)
    if key not in _local.METHOD_NAME:
        with _session_creation_lock:
            # NOTE: we need the lock here to avoid
            # thread-safety issues when creating the resource,
            # because Python module is a shared object,
            # and we are not sure if the code inside
            # 'session().resource()' is thread-safe.
            _local.METHOD_NAME[key] = session().METHOD_NAME(service_name, **kwargs)
    return _local.METHOD_NAME[key]