Invalid inventory retrieval date range

0

If I don't include InventoryRetrievalParameters in initiateJob params for inventory-retrieval, I get my jobId. If I do include InventoryRetrievalParameters, I get a data range error.

code:"InvalidParameterValueException"
message:"Invalid inventory retrieval date range: InventoryRetrievalJobInput::StartDate=2020-03-17T14:21:48.776Z"
name:"InvalidParameterValueException"
requestId:"4y-oJW0GsHlp0o5dTfPQJdzkB6qi3lO4iq7e88eIpTFpDME"
retryable:false
retryDelay:60.730553151816856
stack:"InvalidParameterValueException: Invalid inventory retrieval date range: InventoryRetrievalJobInput::StartDate=2020-03-17T14:21:48.776Z
at Object.extractError (c:\source\repos\Glacier\node_modules\aws-sdk\lib\protocol\json.js:51:27)
at Request.extractError (c:\source\repos\Glacier\node_modules\aws-sdk\lib\protocol\rest_json.js:55:8)
at Request.callListeners (c:\source\repos\Glacier\node_modules\aws-sdk\lib\sequential_executor.js:106:20)
at Request.emit (c:\source\repos\Glacier\node_modules\aws-sdk\lib\sequential_executor.js:78:10)
at Request.emit (c:\source\repos\Glacier\node_modules\aws-sdk\lib\request.js:683:14)
at Request.transition (c:\source\repos\Glacier\node_modules\aws-sdk\lib\request.js:22:10)
at AcceptorStateMachine.runTo (c:\source\repos\Glacier\node_modules\aws-sdk\lib\state_machine.js:14:12)
at c:\source\repos\Glacier\node_modules\aws-sdk\lib\state_machine.js:26:10
at Request.<anonymous> (c:\source\repos\Glacier\node_modules\aws-sdk\lib\request.js:38:9)
at ...
statusCode:400

var params = {
accountId: "-",
jobParameters: {
Description: GET INVENTORY,
Format: 'JSON',
Type: 'inventory-retrieval',
// InventoryRetrievalParameters: {
// StartDate: '2020-03-17T14:21:48.776Z',
// EndDate: '2020-04-04T04:59:31.958Z',
// Limit : '10000'
// } },
vaultName: hidden
};

var response = await initiateJob(params);
if(response) {
console.log(response);
}

const initiateJob = (params) => new Promise((resolve, reject) => {
glacier.initiateJob(params, function(err, data) {
if (err) {
console.log(err, err.stack);
reject(err);
} else {
// return the jobId
resolve(data);
}
});
});

Edited by: gregbolog on Apr 14, 2020 8:25 AM

asked 4 years ago167 views
1 Answer
0

doesn't like fractional seconds

answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions