I was following the below mentioned tutorial for image resizing on the go using Amazon lambda and Amazon API.
After completing all the steps, on testing
http://YOUR_BUCKET_WEBSITE_HOSTNAME_HERE/blue_marble.jpg
displays the required image but
http://YOUR_BUCKET_WEBSITE_HOSTNAME_HERE/300×300/blue_marble.jpg
gives the error {"message": "Internal server error"}
AWS lambda monitor shows the following log.
2017-02-20T12:18:57.979Z c0265015-f766-11e6-932c-ebf25f098e89 { "errorMessage": "The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.", "errorType": "InvalidRequest", "stackTrace": [ "Request.extractError (/var/runtime/node_modules/aws-sdk/lib/services/s3.js:538:35)", "Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:105:20)", "Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:77:10)", "Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:668:14)", "Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)", "AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)", "/var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10", "Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)", "Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:670:12)", "Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:115:18)", "Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:77:10)", "Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:668:14)", "Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)", "AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)", "/var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10", "Request. (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)" ] }
What am i doing wrong? Any help will be appreciated.