Posts

Showing posts with the label amazon

Amazon web services via Grails

I just recently noticed that Amazon have changed the way you invoke their Product Advertising API - you now need to sign requests as described in the Example REST Requests . I obviously haven't been reading my emails, since the first clue came when I saw: <Error><Code>MissingParameter</Code><Message>The request must contain the parameter Signature.</Message></Error> Luckily, they have a java example demonstrating how to make an API request. If you extract the source from this sample into your <GRAILS_APP>/src/java directory, then you can invoke the amazon api with code like: [sourcecode language="java"] import org.codehaus.groovy.grails.commons.ConfigurationHolder import com.amazon.advertising.api.sample.* class AmazonService { private static final String ENDPOINT = "ecs.amazonaws.com"; private static final String AWS_SECRET_KEY = "put your secret key here"; private static final String AWS_ACCESS_KEY_ID...