How to implement amazon api service?

I want to imlement amazon api web service to my application. I have implemente it but its gives error. The error is 'The request must contain the parameter Signature'. How can I solve it?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Vel EousResearch & Development ManagerCommented:
Take a look at the following two web pages:


Amazon documentation on the enforcement of signed API requests including developers guide and sample source code


"AWS Signature Parameter Convert Utility" provided by someone who had a similar issue to yourself.

Hope this helps.
avacaralifeAuthor Commented:
Thanks Tchuki.

Right now I am implementing my web application in .net 2008. I have use the Amazon web service. the web service ULR is : 

When I try to get Item details using ItemLookupRequest, It gives error.

The error is : "The request must contain the parameter Signature"

Show below is my code :

    protected void Button1_Click(object sender, EventArgs e)
       //// Amazon.EC2.AmazonEC2Client c = new Amazon.EC2.AmazonEC2Client("", "");

        //have we this in the cache already?  response;

        if (Cache[TextBox1.Text] == null)
   aws = new;
   request = new;
            string lStrCertPath;
            System.Security.Cryptography.X509Certificates.X509Certificate X509Certificate = new System.Security.Cryptography.X509Certificates.X509Certificate(Server.MapPath("") + "\\cert-364S3JDEKPEOT6VYWBFLVZPECE6QOVMT.pem");

            request.SearchIndex = "Books";

            //request. = "title:" + TextBox1.Text;  
            request.ResponseGroup = new string[] { "Small" };
            //request.SearchIndex = "salesrank";

  [] requests = new[] { request };

   itemSearch = new;
            itemSearch.SubscriptionId = "6MmIULpFVdbxHgh7udwhcJyVOxhkSQpUeqp0SY/N";
            // itemSearch.AssociateTag = "AKIAIJP5BCYL7WMRMD5A";
            //  itemSearch.SubscriptionId = "AKIAJPMM324XXNMQ7AXQ";
            //itemSearch.SubscriptionId = "AKIAJPMM324XXNMQ7AXQ";
            itemSearch.AWSAccessKeyId = "AKIAIJP5BCYL7WMRMD5A";
            // itemSearch.Validate = "false";

            // itemSearch.AWSAccessKeyId = "AKIAJPMM324XXNMQ7AXQ";  
            itemSearch.Request = requests;
            request.Condition =;

            response = aws.ItemLookup(itemSearch);
            Cache.Insert(TextBox1.Text, response, null,
                DateTime.Now.AddHours(24), TimeSpan.Zero);
            response = ([TextBox1.Text];
        } info = response.Items[0];[] items = info.Item;
        Label1.Text = "";
        for (int i = 0; i < items.Length; i++)
   item = items[i];
            Label1.Text += "Book Title: " + item.ItemAttributes.Title + "<br />";
        GridView1.DataSource = AmazonToDataSet("title: " + TextBox1.Text);
    public DataSet AmazonToDataSet(string PowerSearchString)

        DataSet ds;

        //have we this in the cache already?  
        if (Cache[PowerSearchString] == null)
            //create our query  
   response =

            //Construct the dataset to store the results  
            ds = new DataSet();


   info = response.Items[0];
  [] items = info.Item;
            DataRow dr;

            //iterate the results adding new rows with  
            //the values from the search result item.  

            for (int i = 0; i < items.Length; i++)
       item = items[i];
                dr = ds.Tables[0].NewRow();
                dr["ProductName"] = item.ItemAttributes.Title;
                dr["AuthorName"] = item.ItemAttributes.Author[0];
                dr["Price"] = item.ItemAttributes.ListPrice;
                dr["URL"] = item.DetailPageURL;

            //add the dataset to the cache  
            Cache.Insert(PowerSearchString, ds, null,
                DateTime.Now.AddHours(24), TimeSpan.Zero);

            ds = (DataSet)Cache[PowerSearchString];
        //return the dataset  
        return ds;

    private grabAmazonSearch(string PowerSearchString)
    { response; aws = new; request = new;

        request.SearchIndex = "Books";

        //request.Power = PowerSearchString;
        request.ResponseGroup = new string[] { "Small" };
        //request.Sort = "salesrank";[] requests = new[] { request }; itemSearch = new;
        //itemSearch.AssociateTag = "myassociatetag-20";
        itemSearch.SubscriptionId = "AKIAIJP5BCYL7WMRMD5A";
//        itemSearch.AWSAccessKeyId = "AKIAJPMM324XXNMQ7AXQ";  
        itemSearch.Request = requests;

        response = aws.ItemLookup(itemSearch);

        return response;

Give me solution As early as possible.

Thanks in advanse.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Vel EousResearch & Development ManagerCommented:
I've not dealt with AWS API myself which is why I provided the two links.

Perhaps you could provide more information such as which line is generating the error?  You can step through your code using F11 in Visual Studio and when it hits the offending line will automatically stop.

However from the reading I have done using the links I provided for YOU to look through, it can be determine that you require a HMAC-SHA signature concatinated to your API URL.

Take a look at these pages for further info:

// Product Advertising API documentation

// Signed request generator

Challenges in Government Cyber Security

Has cyber security been a challenge in your government organization? Are you looking to improve your government's network security? Learn more about how to improve your government organization's security by viewing our on-demand webinar!

avacaralifeAuthor Commented:
Yes here is the screen shoot of error I have attached. look over it.
Vel EousResearch & Development ManagerCommented:
Does your itemSearch object have a property or method called Signature?

itemSearch.Signature = "";

Open in new window

avacaralifeAuthor Commented:
No there is no signature property.
Vel EousResearch & Development ManagerCommented:
Basically that error message is informing you that your SOAP message does not have a value for a required parameter (web services can implemenet parameters however they can be specified as either IsRequired = true | false).

I did a further google search and turns out the parameter is part of the SOAP header rather than the SOAP body, take a look at the following web page which has been created by someone who has had the same issue or one very similar to yours and provides information regarding a resolution.

This following page might also be of use to you.
Vel EousResearch & Development ManagerCommented:
I would be curious to know just what the resolution was as I feel the information I provided was valid in relation to the question and subsequent information provided.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.