--- amazon.module.orig	2009-07-27 15:17:44.000000000 -0400
+++ amazon.module	2009-08-12 21:03:43.000000000 -0400
@@ -52,7 +52,8 @@ function _amazon_product_data_array($nod
   foreach ($asinlist as $key => $value) $asinlist[$key] = trim($value);
   $asins = implode(',', $asinlist);
   $REST_params = array('AmazonShop'=>$_amazon_locale, 'Operation' => 'ItemLookup', 'ItemId' => $asins,
-                       'AssociateTag'=> variable_get('amazon_associate_id', ''),
+                       'AWSAccessKeyId'=> variable_get('amazon_awsaccess_key', ''),
+		       'AssociateTag'=> variable_get('amazon_associate_id', ''),
                        'ResponseGroup' => 'Medium,Offers',
                        'MerchantId' => 'Featured');
   return amazon_get_items($REST_params);
@@ -114,6 +115,7 @@ function _amazon_product_data_from_Amazo
   $_amazon_locale_list = array_keys($_amazon_search_amazon_shop_URI);
   $_amazon_locale = $_amazon_locale_list[$_amazon_locale_index];
   $REST_params = array('AmazonShop'=>$_amazon_locale,
+                       'AWSAccessKeyId'=>variable_get('amazon_awsaccess_key', ''),
                        'AssociateTag'=>variable_get('amazon_associate_id', ''),
                        'Operation' => 'ItemLookup',
                        'ItemId' => $ASINList,
@@ -717,6 +719,21 @@ function amazon_settings() {
     '#default_value' => variable_get('amazon_associate_id', ''),
     '#description' => t('Lets Amazon.com know which associate to credit with the referral. If you do not fill in this field you will not earn commissions.'),
   );
+  $form['amazon_awsaccess_key'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Amazon AWS Access Key'),
+    '#size' => 30,
+    '#maxlength' => 30,
+    '#default_value' => variable_get('amazon_awsaccess_key', ''),
+    '#description' => t('After August 15, 2009 all requests must be authenticated.  You will need a AWS Developer API account and this will give you an Access Key that needs to entered above'),
+  );
+  $form['amazon_aws_secret_access_key'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Amazon AWS Secret Access Key'),
+    '#default_value' => variable_get('amazon_aws_secret_access_key', ''),
+    '#description' => t('This comes with your key above and is used to sign your requests.'),
+  );
+
   $form['amazon_ratings_labels'] = array(
     '#title' => t('Ratings labels'),
     '#type' => 'textarea',
@@ -766,7 +783,8 @@ function _amazon_bulk_import(&$_search_f
     foreach ($_search_form_values[items] as $asinkey => $amazon_item) {
       if (isset($amazon_item['add'])) $ASIN_array[] = $asinkey;
     }
-    $ASIN_query_params = array('AssociateTag'=>variable_get('amazon_associate_id', ''),
+    $ASIN_query_params = array('AWSAccessKeyId'=>variable_get('amazon_awsaccess_key', ''),
+                      'AssociateTag'=>variable_get('amazon_associate_id', ''),
                       'AmazonShop'=>$_amazon_locale,
                       'Operation' => 'ItemLookup',
                       'ItemId' => implode(',', $ASIN_array),
@@ -852,6 +870,7 @@ function _amazon_search_params($_search_
   if ($_search_form_values['SearchFor']) {
     $_amazon_search_params = array();
     // get the search parameters
+    $_amazon_search_params['AWSAccessKeyId'] = variable_get('amazon_awsaccess_key', '');
     $_amazon_search_params['AssociateTag'] = variable_get('amazon_associate_id', '');
     $_amazon_search_params['Operation'] = $_search_form_values['Operation'];
     $_amazon_search_params['SearchIndex'] = $_search_form_values['SearchIndex'];
