Amazon Web Service Secure Request

Some time back I wrote a post on C# API for Amazon Product Advertising Web Service. If you are one of amazon associates who is using their web service to advertise their products to earn some money, then you must be getting emails with following message from Amazon.com.

We wanted to remind you that all Product Advertising API developers will be required to authenticate all calls to the Product Advertising API by August 15, 2009. We noticed that requests with your AWS Access Key ID are not being signed and, while you have more than 60 days until the date on which authentication is required, we are, as a courtesy, sending you this email to remind you of the new authentication requirement. Please remember that calls to the Product Advertising API that are not signed will not be processed after August 15, 2009.

There is nothing to worry about this. It is a very simple change that you will need to make on your end. Amazon has given two options to digitally sign the requests. Either encrypt all requests with HMAC-SHA encryption or use X509Certificate. If you don't have X509Certificate, don't worry about it. Amazon.com is creating one for you if you ask it to. I found this option to use X509Certificate to be the easiest to comply with Amazon.com policy. Here are the steps you will need to use.

  • Login into your AWS account.
  • Click on Access Identifiers link on Your Account page.
  • At the end of the page you will find section for X509.Certificate. Click on Create New option to create your certificate.
  • Make sure that you follow the instructions and save the private key and certificate file as the process asks you to.

Now time to make code change. It is simple. Just add one line to your implementation and you are all set.


m_obAmazonService.ClientCertificates.Add(X509Certificate.CreateFromCertFile(X509CertFile));

X509CertFile is full path to where this file is stored. If you are using the API in web application, make sure you specify fully qualified path and your application has read permissions on this file as well. You can this in action here - Winazon.Net

blog comments powered by Disqus
Search
Share

Smart Phones Poll

What smart phone do you currently own?





Show Results

Month List