How to upload documents to AWS CloudSearch with Boto3
Asked Answered
M

1

5

So I'm not sure how to point to the correct domain with:

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

The documentation says to configure the domains with CloudSearch DescribeDomains actions.

However, the documentation for CloudSearch only lists a method, describe_domains, which merely lists the domains, info etc.

How do I point to the correct domain to upload documents to CloudSearch?

Matthaus answered 4/4, 2017 at 20:36 Comment(0)
M
7

when initializing the client, use the kwarg endpoint_url ->

boto3.client('cloudsearchdomain', endpoint_url="http://search.example.cloudsearch.aws")
Matthaus answered 6/4, 2017 at 14:44 Comment(1)
Note importantly that while boto3.client('cloudsearch').describe_domains() will give you the endpoint, you need to add 'http://' to it or it will just complain that it doesn't exist.Sweat

© 2022 - 2024 — McMap. All rights reserved.