Since version 9.0.1 (if I am not mistaken) ColdFusion supports Amazon's S3 file storage pretty much out of the box. The complexities of access control to your bucket is abstracted away and you can use S3 almost like a local file system. You can read more about it in the CF docs and on Ray Camden's blog.
My task at hand was to accept user submitted file uploads and store them in S3. According to the CF documentation the full set of cffile operations is supported, however I could not get it to work.
The following failed for me with a 'destination invalid' error:
<cffile action="upload" filefield="logo" destination="#mydir#" nameconflict="makeunique" charset="utf-8" />
The way I managed to work around the bug related to not being able to upload files directly into S3 I uploaded to my CF server first and then effectively moved the image into S3. This seemed to work:
<!--- upload to own server --->
<cffile action="upload" filefield="logo" destination="#expandpath('./')#" nameconflict="makeunique" charset="utf-8" />
<!--- create a unique name to save the image as --->
<cfset logoImage = "#createUUID()#.#cffile.serverFileExt#" />
<cfset imgPathLocal = "#expandpath('./')#/#cffile.serverFile#">
<!--- open local image, then write to S3 --->
<cfset localImage = imageRead("#imgPathLocal#")>
<cfset imageWrite(localImage, "#mydir#/#logoImage#")>
<!--- set permissions on the newly created file on S3 --->
<cfset perms = [
<!--- delete the local image now --->
<cffile action="delete" file="#imgPathLocal#">
Note that this code is untested in its current form but should give you the idea. Hope it helps.