Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnrecognizedClientException: The security token included in the request is invalid. #36

Open
semionenko opened this issue Apr 20, 2018 · 3 comments

Comments

@semionenko
Copy link

I use your application as in the description, but I see the error:
{ UnrecognizedClientException: The security token included in the request is invalid.
at Request.extractError (/Users//Documents/DynamoDBtoCSV/node_modules/aws-sdk/lib/protocol/json.js:48:27)
at Request.callListeners (/Users//Documents/DynamoDBtoCSV/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
at Request.emit (/Users//Documents/DynamoDBtoCSV/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
at Request.emit (/Users//Documents/DynamoDBtoCSV/node_modules/aws-sdk/lib/request.js:683:14)
at Request.transition (/Users//Documents/DynamoDBtoCSV/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/Users//Documents/DynamoDBtoCSV/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /Users//Documents/DynamoDBtoCSV/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request. (/Users//Documents/DynamoDBtoCSV/node_modules/aws-sdk/lib/request.js:38:9)
at Request. (/Users//Documents/DynamoDBtoCSV/node_modules/aws-sdk/lib/request.js:685:12)
at Request.callListeners (/Users//Documents/DynamoDBtoCSV/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
message: 'The security token included in the request is invalid.',
code: 'UnrecognizedClientException',
time: 2018-04-20T04:38:47.883Z,
requestId: '6M8VSR0LJ87E9VFCRT8FTHAQ0FVV4KQNSO5AEMVJF66Q9ASUAAJG',
statusCode: 400,
retryable: false,
retryDelay: 15.516383183565807 }

Could you explain why it happens? The configuration file contains the same settings as my mobile application.

@MrZMN
Copy link

MrZMN commented May 2, 2018

I think it's the problem about your 'region'. You may find your right region of your relevant service in this website: http://docs.amazonaws.cn/en_us/general/latest/gr/rande.html#cnnorth_region

@Aditya27
Copy link

Try specifying the region explicitly
node dynamoDBtoCSV.js -t 'tableName' --region 'us-west-2' > output.csv

@EavesofIT
Copy link

In case anyone is trying this with STS, you'll need to include the sessionToken provided by STS. You can update your config.json with the "sessionToken": "REPLACEWITIHSESSIONTOKEN" value.

{
    "accessKeyId": "REPLACE",
    "secretAccessKey": "REPLACE",
    "sessionToken": "REPLACEWITIHSESSIONTOKEN",
    "region": "REPLACE"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants