| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Amazon Elastic MapReduce (Amazon EMR) requires that each HTTP or HTTPS Query request formatted for signature version 2 contain the following:
Endpoint—Also known as the host part of the HTTP request. This is the DNS name of the machine to which you send the Query request. This is different for each AWS region. For the complete list of endpoints supported by Amazon EMR go to Regions and Endpoints in the Amazon Web Services General Reference.
The endpoint,
elasticmapreduce.amazonaws.com, shown in the example below, is the default endpoint.
Action—Specifies the action that you want Amazon EMR to perform.
This value determines the parameters that are used in the request. For descriptions of all Amazon EMR actions and their parameters, see the Amazon Elastic MapReduce API Reference.
The action in the example below is DescribeJobFlows, which causes Amazon EMR to return details about one or more clusters.
Required and optional parameters—Each action in Amazon EMR has a set of required and optional parameters that define the API call. For a list of parameters that must be included in every Amazon EMR action, see Common Request Parameters.
In the example below, the action DescribeJobFlows has a single parameter
JobFlowIds.member.1 which specifies the identifier of the cluster for
which you want Amazon EMR to return details.
AccessKeyId—A value distributed by AWS when you sign up for an AWS Account.
To view your Access Key ID, go to AWS Security Credentials in the Amazon Elastic MapReduce (Amazon EMR) Getting Started Guide.
For information about how Amazon EMR uses the AccessKeyId to validate your call, go to Why Query Requests Are Signed.
Timestamp—This is the time at which you make the request. Including this in the Query request helps prevent third parties from intercepting your request and re-submitting to Amazon EMR.
SignatureVersion—The version of the AWS signature protocol you're using. For Amazon EMR the current supported version is 2.
SignatureMethod—The hash-based protocol you are using to calculate the signature. This can be either HMAC-SHA1 or HMAC-SHA256 for version 2 AWS signatures.
Signature—This is a calculated value that ensures the signature is valid and has not been tampered with in transit. Amazon EMR currently uses version 2 of the AWS signature protocol for signing requests.
Following is an example Query request formulated as an HTTPS GET request. (Note that in the actual Query request, there would be no spaces or newline characters. The request would appear as a continuous line of text. The version below has been formatted for human readability.)
https://elasticmapreduce.amazonaws.com? Action=DescribeJobFlows& JobFlowIds.member.1=JobFlowID& AWSAccessKeyId=AccessKeyID& Timestamp=2009-01-28T21%3A49%3A59.000Z& SignatureVersion=2& SignatureMethod=HmacSHA256& Signature=calculated value
Note
Be sure to URI encode the GET request. For example, blank spaces in your HTTP GET request should be encoded as %20. Although an unencoded space is normally allowed by the HTTP protocol specification, use of unencoded characters creates an invalid signature in your Query request.