10 Replies Latest reply on Oct 9, 2015 8:23 AM by jthompsonmb

    Amazon S3 requests fail with org.apache.commons.vfs.FileSystemException

    cherdt Level 1

      I'm attempting to use cffile to retrieve an item from AWS S3 using CF's Using Amazon S3 Storage examples. I have tried this on 2 systems:

      1. CF 9,0,1,274733, Windows 2008 R2, IIS 7.5
      2. CF 10,0,10,284825, Windows 2008 R2, IIS 7.5


      The file I am trying to retrieve is web-accessible at http://osric-com.s3-website-us-east-1.amazonaws.com/alpha.txt and permissions are set to open for everyone.


      Here's the initial code I tried:

      <cffile action="read" file="s3://osric-com/alpha.txt" variable="result">
      <cfdump var="#result#">


      This returned the following error:

      An error occurred when performing a file operation create on file s3://osric-com/alpha.txt.

      The cause of this exception was: org.apache.commons.vfs.FileSystemException: Unknown message with code "S3 Error Message."..


      As a second attempt, I tried adding an Application.cfc to that directory and specifying the access key ID, the secret key, and location/region:

                          this.name ="Object Operations"; 
                          this.s3.accessKeyId = "XXXXXXXXXXXXXXXXXXXXXXXX"; 
                          this.s3.awsSecretKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 


      Same error message. I'm not sure what I'm doing wrong.