def METHOD_NAME(
    s3_endpoint: str,
    s3_access_key: str,
    s3_secret_key: str,
    s3_region: str,
    s3_provider: S3Provider,
) -> Path:
    config_content = R_CLONE_CONFIG.format(
        destination_provider=resolve_provider(s3_provider),
        destination_access_key=s3_access_key,
        destination_secret_key=s3_secret_key,
        destination_endpoint=s3_endpoint,
        destination_region=s3_region,
    )
    conf_path = Path("/tmp/rclone_config.ini")  # NOSONAR
    conf_path.write_text(config_content)  # pylint:disable=unspecified-encoding
    return conf_path