Hi Red, I haven't worked with CloudSearch, but have worked with other AWS services, I think you probably need to authenticate your request with some credentials. Checkout this project for some sample code: http://awsconsole.riaforge.org/
Thank you for your response. For some reason, I was not able to reply to my own post. Maybe I just wasn't signed in.
Anyway, the problem was with the json that I was uploading and not with my method for uploading it. I was actually able to remove the "Accept" and "Content-Length" params.
I had added a space in front of the ID so that the serializedjson function would treat it as a string and not a number but the API required that field start with an alphanumeric character. Since I am using the sku number for that product, I just changed it to sku12345 etc so that it was seen by the serializedjson function as a string and the API would accept it.
Also, I had to add brackets around the enitre body because the Cloudsearch API wanted the entry to be an array so I just added:
<cfset theuploaddata = "[" & variables.dataFields & "]">
Once I made those changes, the server responded with a 200 code and updated the item. Now I just need to figure out how to get arrays past the CF json tag. Some of our json is set up for the cloudsearch in arrays like colors. The facets need to appear in the upload as "Colors" : ["Red","Blue"] but the serialized json tag automatically escapes the quotes in the facets. I think I saw some third party custom tags that I can use as a work around.
Thanks again for your help. The Cloudsearch service has been awesome so far. We are really happy with it. We are a small to midsized company and the cost of a dedicated search company was 10-15 as much as the cloud search and they basically wanted total control of the site. The cloudsearch required a considerable amount of work to set up but it works beautifully. Since we use it for navigation too, I have been thinking about caching the json for the common requests.
Good to know about CloudSearch, thanks Red. -pete