Plugin

Developer
Supported

Amazon Web Services (AWS) Products

ExpressionEngine 1.x, ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4

Back to this add-on's main page
View Other Add-ons From Hop Studios

     

You must be logged in to post.

SignatureDoesNotMatch

General

jcogs.design
jcogs.design

Getting this error from AWS and cannot work out what / why.

Have created an affiliate account in Amazon
Have enabled AWS for the account and inserted affiliate ID into tag
Have created Access Key ID / Secret Access Key and inserted into tag
Have found valid ASIN and inserted into tag

This is the resulting code (obfuscated):

{exp:aws_products:search item_id="1473621445" associate_id="my_id" public_key="my access key id" private_key="my secret access key" debug="yes"}Great book{product_name}{/exp:aws_products:search} 

This gives the following error message from AWS

<ItemLookupErrorResponse xmlns="http://ecs.amazonaws.com/doc/2009-03-31/">
<
Error>
<
Code>SignatureDoesNotMatch</Code>
<
Message>
The request signature we calculated does not match the signature you providedCheck your AWS Secret Access Key and signing methodConsult the service documentation for details.
</
Message>
</
Error>
<
RequestId>a00e0af1-1639-4750-8ff4-b58bcea1f497</RequestId>
</
ItemLookupErrorResponse

Grateful for any guidance you can give to get this to work.

Travis Smith
# 1
Developer
Travis Smith

Hi Gavin,

I want to make sure you correctly setup your keys to access the products API.
You went to “My Security Credentials” and created a key in the Access Keys part. So you should have something like the screenshot attached.
Is that all correct ?

Can you try this code (replace the public key and private key with yours, and associate_id too) :

{exp:aws_products:search limit="20" region="com" debug="no" associate_id="hopstudios" public_key="xxx" private_key="xxxxxxxxxx"}

{define_keywords}frontend{
/define_keywords}

{if amazon_link}amazon_link
: <a href="{amazon_link}">{amazon_link}</a><br />{/if}
{if product_name}product_name
{product_name}<br />{/if}

{
/exp:aws_products:search} 

I’ve created a new set of keys, and used that code to test it. I wasn’t able to reproduce the issue you’re having. I see you’re not using the region option, the issue might come from that.

Please let me know how it goes.

Thanks

jcogs.design
# 2
jcogs.design

Hi - tried the exact code (but with our own ID and keys) and got identical error to previously.  Have double-checked and the ID and keys are all correct.  Didn’t know about the regional thing - my account is on the amazon.co.uk system - but putting co.uk into region doesn’t change the error: should it work for other regions than .com?

jcogs.design
# 3
jcogs.design

I’ve just tried this again and it works using

region=".co.uk" 

- not sure what I am doing differently to last time I tried, but happy to roll with the outcome and move on :)

Thanks alot for having a look.

Travis Smith
# 4
Developer
Travis Smith

Hi there,

I’m glad that’s working for you now.
I’ll make sure the documentation mentions that the region parameter is necessary and needs to be set accordingly to the AWS account.