I am working on a project for work that involves replacing a current "tape and staple" file delivery system. It's a Drupal site, but with many many third party outdated VERY unstable software. However, it successfully sells very large files from S3.

My job is to use Drupal 7 with Drupal Commerce Module set, Commerce file Module 7.x-2.0, AmazonS3 7.x-2.0 Module. Also, the files that will be associated with one specific field live in various S3 Buckets.

I successfully got all of the above modules working as advertised. But my functionality is not complete.

What I need:

  1. The ability to choose buckets within the field when creating a product.
  2. link to an existing .zip file already stored on S3

About Bucket Selection: I have files located in various buckets. These files relate to the same Content type and product type. (at the time the business started they didn't understand what buckets meant. so files are a bit disorganized) I need to have the file attachment field have the ability to select a file from S3, from various buckets. Example: Product A has a file in Bucket A. Product B has a file in Bucket B. Etc... So when creating a product, the file field (that will contain the file being sold) will need to have the ability to attach an S3 file located in various buckets

Am I on the right path? Are the above modules the correct ones to have? Is there another one i need to make my connection complete or will I have to design one to get my final needs?

Update: I just found the Amazon S3 File System Module Is this something that would help me?

  • Can you improve your question to better explain your needs about those "buckets within the field"? Jan 12, 2017 at 9:33
  • I have done this thing for a previous employer in 2014. At the time there wasn't a way to select buckets, but it would email them an S3 link and limit their access duration. I don't have access to the site anymore so I can't be much help. Luck!
    – ponies
    Jan 12, 2017 at 16:21
  • Pierre.Vreins, i updated my question with more details about Bucket Selection option needed
    – Anon Ymous
    Jan 13, 2017 at 4:41
  • There isn't anything out there with the functionality that you are looking for. Therefore, you will need to modify one of those modules and add those functionalities through custom code.
    – No Sssweat
    Jan 15, 2017 at 2:33
  • Can anyone help me modify the modules to get this function?
    – Anon Ymous
    Jan 15, 2017 at 8:32

1 Answer 1


You really want to use the Drupal License and License Billing modules to sell access to Commerce Files.

It might take a little custom code (a few simple objects and a few hooks) to make sure your amazon S3 links are getting licensed correctly to the right user.

In terms of your two requests:

  1. The ability to choose buckets within the field when creating a product.
  2. link to an existing .zip file already stored on S3

Yeah, it looks like s3 file system module is the way to go for S3 API ... they even have a migrate module and a proxy module that could make a simple file on your website, load to an s3 of your choice and still be linked to your local.

If you installed the S3 module mentioned above, you could:

  1. Use hook_form_alter() to modify the file field
  2. Use hook_form_alter() to add pre-empt the normal submit handler
  3. Use your new submit handler to save the file to your preferred bucket.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.