For the Drupal 7 branch, it would be nice if we could use the AWS SDK for PHP, which seems to be where the momentum is moving for Amazon's SDK use in Drupal...

Comments

Ryan Palmer’s picture

I agree!

mikeker’s picture

Status: Active » Needs review
StatusFileSize
new5.25 KB

The attached patch switches the dependency of this module from Creeper to AWS SDK for the D7 branch. But this might be a bit surprising for the 25 or so installs if they simply "drush up" to pull in the latest changes.

To allow EITHER Creeper or AWS SDK, we could remove the dependencies[] line in the .info file, replace amazon_ses_enable() with

/**
 * Implements hook_enable().
 */
function amazon_ses_enable() {
  // Just to make sure.
  variable_set('mail_system', array('default-system' => 'DefaultMailSystem'));

  // Check for a proper AWS SDK module.
  if (!module_exists('awssdk') || !module_exists('creeper')) {
    drupal_set_message(t(
      'Either the !awssdk (prefered) or !creeper modules need to be installed and enabled before using Amazon SES.',
      array(
        '!awssdk' => l('AWS SDK', 'http://drupal.org/project/awssdk'),
        '!creeper' => l('Creeper', 'http://drupal.org/project/creeper'),
      )
    ));
  }
}

and to wrap all calls the libraries_load('awssdk') with a check that awssdk is enabled. That would make the upgrade for existing users easier, but would lose the automatic checks that dependent modules are enabled before this module is enabled.

My personal preference would be to rip off the band-aid, namely to switch the dependency and require existing users to install AWS SDK...

NOTE: The attached patch also does a few housecleaning items mostly in amazon_ses.admin.inc. Those are unrelated to this issue and I'm happy to remove them if you want a cleaner patch. But they do solve issues with undefined vars on the settings page.

dgwave’s picture

This is the patch that I used to enable AWS SDK, with some error checking.

jcanfield55’s picture

Thanks for this patch -- it worked great. I was newly installing Amazon_SES and I was unable to get Creeper working after about a day of trying. Being able to switch to awssdk module was a lifesaver.

tkuldeep17’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)

This version is not supported now.