Reputation: 1335
which are the required headers we need to send in the header using dynamodb rest api
'x-amz-date': 'Mon, 16 Jan 2012 17:50:52 GMT',
'x-amzn-authorization': 'AWS3 AWSAccessKeyId=TemporaryAccessKeyID,Algorithm=HmacSHA256,SignedHeaders=Host;x-amz-date;x-amz-target;x-amz-security-token,Signature=*Signature Value*=',
'Date': 'Mon, 31 Oct 2011 17:49:52 GMT',
'x-amz-target': 'DynamoDB_20111205.GetItem',
'x-amz-security-token': '*Token Value*',
'Content-Type': 'application/x-amz-json-1.0',
'Content-Length': '135',
'Connection': 'Keep-Alive',
'User-Agent': 'aws-sdk-java/1.2.10 Windows_7/6.1 Java_HotSpot(TM)_64-Bit_Server_VM/20.2-b06',
}
can i know what are all the required parameters we need to pass through http rest api for dynamo ... I need to fetch the data from dynamodb database??? can anyone suggest what are required headers link
Upvotes: 3
Views: 2401
Reputation: 1075
It's not yet a year since the question is asked so I hope it's not too late to answer. :-)
One of the best ways to find out which HTTP header field is required is to use the AWS SDK. This approach is recommended by AWS. (according to a forum post by an @AWS guy) You may:
For example, in a ListTables request, the following Headers are used:
Notice that the HTTP header shall be capitalized. The log also show the signature that are turned to lower case. "Content-Length" and "User-Agent" are optional, the other fields are mandatory. "Content-Type" can be "application/json" if you don't like "x-amz-json-1.0".
It seems to me there are two tricky parts to implement our own REST client, one is do the signature right, the other is to get the headers right. For the signature part, AWS provides a test suite that allows us to verify our signature implementation.
Upvotes: 2