I installed cs-import-documents after run the follow command line:
cs-import-documents -d http://mydomain.cloudsearch.amazonaws.com --source Documents/data.json`
I get the following error:
Content is not allowed in prolog. Unable to unmarshall error response ({
"message": "Request forbidden by administrative rules",
"__type": "CloudSearchException" } )
(Service: AmazonCloudSearchv2; Status Code: 403; Error Code: 403 Forbidden; Request ID: null)
What am I doing wrong?
It sounds like you don't have you AWS access keys set up correctly and it's rejecting you for lacking authorization.
This is covered in the "Installing Command Line Tools" section of the docs below -- have another look at that and double-check that you've followed all the steps correctly (particularly step 7 which deals with credentials)
http://docs.aws.amazon.com/cloudsearch/latest/developerguide/using-cloudsearch-command-line-tools.html
Also for debugging (as mentioned in step 9 of the above link), try running cs-import-documents
with no args. If you've set things up correctly, you should get the message "Expected at least one input source".