4 replies [Last post]
Mountain Size Records's picture
Offline
Joined: 05/05/2010
Juice: 44
Was this information Helpful?

Is anyone using the uc_cloudfront module successfully? I cannot seem to get it to work reliably. It's probably me though. Any help would be much appreciated.

Mountain Size Records's picture
Offline
Joined: 05/05/2010
Juice: 44
Re: uc_cloudfront... Anyone have it working?

I'm very close to having this working now. I'm hoping someone can shed some light. Here is what I've done so far:

- Signed up for S3 and CloudFront
- Installed CloudBerry
- Created a Bucket and created the same directory structure in that bucket as I havon my site currently
- Uploaded my files to the bucket
- Using CloudBerry. Created a distribution. Enabled the distribution. Made the distribution private.
- Edited the ACL to allow owner all access and the Origin Access Identity Read.
- Tested file access using the CloudFront URL. Success!
- At this point the files are being served by CloudFront only and cannot be accessed through S3 directly. Perfect!
- Edited the distribution to allow myself as a trusted signer.
- Created a canned policy
- Tested file access without a signed URL. Didn't work. Success!
- Tested file access WITH a signed URL. Works. Success!
- Install Media_Mover
- Install uc_cloudfront
- Enabled the Media Mover API, the S3 Media Mover module, and the Cloud Front Module.
- Changed permissions for Media Mover and added site administrator to all media mover tasks.
- Changed permissions for CloudFront and added site administrator to all media mover tasks.
- Entered our CloudFront settings in the Amazon CloudFront settings, admin/store/settings/cloudfront
- Tested URL generation using admin/store/products/cloudfront
- The URLs *look* correct but I get an "Access Denied" when I try to use them.
- Do a test purchase in the store and try to download the file via the Files tab and get a Page Not Found. Understandably because the URL isn't correct. Instead of the CloudFront URL, file name, variables it adds my site URL infront of the CloudFront URL and drops the file names completely like this: http://www.mysite.com/subdom.cloudfront.net/?Expires=etc.

So, with the Generate CloudFront URLs screen I get Access Denied and when I try to download files as a cutomer from the Files tab I get Page Not Found.

I didn't change any settings inside of Media Mover because it is my understanding that nothing need actually be configured. I could be wrong though. Anyway, any help someone could offer would be very much appreciated.

Thanks!

Mountain Size Records's picture
Offline
Joined: 05/05/2010
Juice: 44
Re: Re: uc_cloudfront... Anyone have it working?

Just an update in hopes that this helps anyone else who might run into these problems...

Our file names have spaces in them. For example, 01 First Song.mp3. The "Generate CloudFront URLs" at admin/store/products/cloudfront will NOT generate valid URLs if your filenames have spaces. As soon as I changed the filenames so that they did NOT have spaces these URLs started working. HOWEVER, the file links in the Files tab in the user's account still do NOT include the files names and they now spit back XML vomit. It looks like a total directory listing for the distribution but in XML.

Mountain Size Records's picture
Offline
Joined: 05/05/2010
Juice: 44
Re: Re: Re: uc_cloudfront... Anyone have it working?

Is anyone using the uc_cloudfront module successfully? Is anyone using the CloudFront service with Ubercart without the module?

Mountain Size Records's picture
Offline
Joined: 05/05/2010
Juice: 44
It's WORKING with some loss in functionality

WE HAVE THIS WORKING! Yea!

The uc_cloudfront module relies heavily... wait lemme stress that... HEAVILY... no not enough... HEAVILY on the Media Mover module. Lullabot states that Media Mover is required but they don't emphasize to what extent. You must install Media Mover and have it move your files for you into your Amazon S3 bucket. The most basic config that works for Media Mover seems to be:

Harvest - Look at a local directory for files of a particular type. For us, it's wav mp3 jpg. This seems to need to be the exact same directory that you setup in your Ubercart store for the file downloads.
Process - Ignore
Storage - Move the files to S3
Complete - Generate CloudFront URL

THEN you setup your products for sale in your store.

Only problem is, uc_cloudfront doesn't write to the log file when a user starts and completes a download. Customers are not prompted to "Open or Save as..." when they click on a link in their Files tab. For us, the browser starts playing the song. The restrictions (like IP and number of downloads) doesn't really work.

I have placed a Bounty in hopes that someone will be willing to implement these features.