-1

I'm using the AWS CLI, in particular the cs-configure-from-batches command but I'm getting an invalid format error as per below.

C:\>cs-configure-from-batches -d mysearchdomain --source C:\CloudSearch\AWSCloudSearchImplementation\XmlMiniBatch.xml --endpoint cloudsearch.ap-southeast-2.amazonaws.com  --verbose

Connecting to CloudSearch in region [ap-southeast-2]

Sending to endpoint [https://cloudsearch.ap-southeast-2.amazonaws.com/] for region [ap-southeast-2]

Endpoint set as cloudsearch.ap-southeast-2.amazonaws.com

Analyzing sources.
Invalid format for C:\CloudSearch\AWSCloudSearchImplementation\XmlMiniBatch.xml, ignoring.
Analysis results.

This is the xml I'm giving it

<?xml version="1.0" encoding="utf-8"?>
<batch>
  <add id="96FD3C87-DF5C-E511-8167-02CC745DD7D4">
    <field name="code">000000000000010000</field>
    <field name="description">Blah Blah</field>
    <field name="sprcode">4100</field>
    <field name="levelonehierarchy">Blah</field>
    <field name="leveltwohierarchy">Blah</field>
  </add>
</batch>

Does any have a sample xml file that this command will accept? Or suggestions as to what's wrong?

Andrew Duffy
  • 795
  • 2
  • 17
  • 37

1 Answers1

0

This error was caused by using encoding UTF-8, as soon as I used UTF-8 without BOM it worked! Of course, silly me.

Andrew Duffy
  • 795
  • 2
  • 17
  • 37