Quantcast
Channel: Adobe Community : Popular Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 14291

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

$
0
0

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:

<cfcomponent>          <cfscript>                    this.name ="Object Operations";                    this.s3.accessKeyId = "XXXXXXXXXXXXXXXXXXXXXXXX";                    this.s3.awsSecretKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";                    this.s3.defaultLocation="US";          </cfscript></cfcomponent>

 

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


Viewing all articles
Browse latest Browse all 14291

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>