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?

Jamie
  • 1,530
  • 1
  • 19
  • 35
pauld
  • 401
  • 1
  • 5
  • 20

1 Answers1

7

when initializing the client, use the kwarg endpoint_url ->

boto3.client('cloudsearchdomain', endpoint_url="http://search.example.cloudsearch.aws")
pauld
  • 401
  • 1
  • 5
  • 20
  • 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. – eeegnu Sep 27 '21 at 21:52