danieljoos/aws-sign-web

Use AWS Naming convention for Key and Secret

ferdil opened this issue · 1 comments

Nice work Daniel,

I have a suggestion - it would make sense to use the AWS convention for the configuration parameters for the Key and Secret (i.e. accessKeyId and secretAccessKey or use AWSAccessKeyId and AWSSecretAccessKey) as this is what it is in all the AWS documentation.

Then the configuration in the user's Javascript would be:

var config = {
	// AWS Region (default: 'eu-west-1')
	region: 'eu-west-1',
	// AWS service that is called (default: 'execute-api' -- AWS API Gateway)
	service: 'execute-api',
	// AWS IAM credentials, here some temporary credentials with a session token
	accessKeyId: '...',
	secretAccessKey: '...',
	sessionToken: '...'

This would then be consistent with the AWS Response for temporary credentials (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html

Sounds good to me. I changed the property name from secretKey to secretAccessKey.