I am trying to generate a Signature Version 4, for use in an AWS-SES Query API GET request. I am trying to generate a 'String to sign', and part of the variables required is the name of the service I am trying to access. I have looked through the documentation and cannot find the answer to the following question: What is the service name of AWS-SES? is it 'email', 'SES'?
StringToSign =
Algorithm + \n +
RequestDateTime + \n +
CredentialScope + \n +
HashedCanonicalRequest
CredentialScope = 20150830/ue-west-1/ServiceName/aws4_request\n
From Signature Version 4 Signing Process » Changes in Signature Version 4 Changes in Signature Version 4
Service name information as a lowercase alphanumeric string (for example, iam). Use the service name that is part of the service's endpoint. For example, the IAM endpoint is https://iam.amazonaws.com, so you use the string iam as part of the Credential parameter.
Checking Amazon SES Endpoints, we can see the list of SES end points:
The following sections list the AWS regions in which Amazon SES is available, and the corresponding endpoints for sending and receiving emails.
Using the API (HTTPS) endpoint documented there, it shows the endpoint reference in EU (Ireland) as email.eu-west-1.amazonaws.com
. The endpoint formatted is the same in all regions. Therefore, the correct ServiceName for the CredentialScope
is email