在本地运行 lambda,我得到了错误。
AWS.config.update({
region: 'ap-southeast-1',
accessKey: 'xx',
secretAccessKey: 'xxx',
});
{ UnrecognizedClientException: The security token included in the request is invalid.
at Request.extractError (D:\Work\Amazon\BillingAggregator\billing-file-sender\node_modules\aws-sdk\lib\protocol\json.js:48:27)
at Request.callListeners (D:\Work\Amazon\BillingAggregator\billing-file-sender\node_modules\aws-sdk\lib\sequential_executor.js:105:20)
at Request.emit (D:\Work\Amazon\BillingAggregator\billing-file-sender\node_modules\aws-sdk\lib\sequential_executor.js:77:10)
at Request.emit (D:\Work\Amazon\BillingAggregator\billing-file-sender\node_modules\aws-sdk\lib\request.js:683:14)
at Request.transition (D:\Work\Amazon\BillingAggregator\billing-file-sender\node_modules\aws-sdk\lib\request.js:22:10)
at AcceptorStateMachine.runTo (D:\Work\Amazon\BillingAggregator\billing-file-sender\node_modules\aws-sdk\lib\state_machine.js:14:12)
at D:\Work\Amazon\BillingAggregator\billing-file-sender\node_modules\aws-sdk\lib\state_machine.js:26:10
at Request.<anonymous> (D:\Work\Amazon\BillingAggregator\billing-file-sender\node_modules\aws-sdk\lib\request.js:38:9)
at Request.<anonymous> (D:\Work\Amazon\BillingAggregator\billing-file-sender\node_modules\aws-sdk\lib\request.js:685:12)
at Request.callListeners (D:\Work\Amazon\BillingAggregator\billing-file-sender\node_modules\aws-sdk\lib\sequential_executor.js:115:18)
message: 'The security token included in the request is invalid.',
code: 'UnrecognizedClientException',
time: 2018-08-03T08:21:29.493Z,
requestId: 'e07f905c-0bbf-4508-8f79-ca0dc9348867',
statusCode: 400,