lundi 27 juillet 2015

Amazon API Gateway IAM authenticated example with generated JS SDK

I have created sample GET and POST APIs on Amazon API Gateway following their official documentation. I have generated JS SDK for these APIs, which I am using to call these APIs from a client-side JS file hosted on S3. This works flawlessly without any 'Authorization Type'.

Now, when I set 'Authorization Type' for GET method as 'IAM', I am required to pass IAM credentials in order for it to work. In spite of passing my AWS account's root credentials, I am getting this in the response headers:

x-amzn-ErrorType:InvalidSignatureException:http://ift.tt/1fBs9t5

And finally it returns a 403 error code.

My question is: Has anyone successfully attempted to use generated javascript SDK from Amazon API Gateway with IAM authentication? Can you point where I might be going wrong?

Thanks.




Aucun commentaire:

Enregistrer un commentaire