如何使用Boto3将文档上传到AWS CloudSearch

问题描述 投票:4回答:1

所以我不确定如何使用以下方法指向正确的域:

boto3.client('cloudsearchdomain').upload_documents(file, type)

documentation说使用CloudSearch DescribeDomains操作配置域。

但是,documentation for CloudSearch仅列出方法describe_domains,仅列出域,信息等。

我如何指向正确的域以将文档上传到CloudSearch?

amazon-web-services boto3 amazon-cloudsearch
1个回答
5
投票

初始化客户端时,使用kwarg endpoint_url->

boto3.client('cloudsearchdomain', endpoint_url="http://search.example.cloudsearch.aws")
© www.soinside.com 2019 - 2024. All rights reserved.