aws-sdk-js-automation on master
Updates SDK to v2.1197.0 (compare)
aws-sdk-js-automation on v2.1197.0
const params = {
UserPoolId: this.userPoolId,
ClientId: this.clientId,
AuthFlow: 'REFRESH_TOKEN',
AuthParameters: {
REFRESH_TOKEN: request.body.refresh_token
}
};
const cognito = new AWS.CognitoIdentityServiceProvider();
const response = await cognito.adminInitiateAuth(params).promise();
adminInitateAuth
and initateAuth
requests returns same response with REFRESH_TOKEN
or REFRESH_TOKEN_AUTH
parameters in AuthFlow
try {
const response = await dynamo.get(params).promise()
console.log(
"dynamoResponse: " + JSON.stringify(response, undefined, 2));
if (JSON.stringify(response.Item) === {}) {
console.log("Got Empty response, returning 404")
return {
statusCode: 404, body: "error: display preference is not found"
+ " for the user"
}
}
return {statusCode: 200, body: JSON.stringify(response.Item)}
} catch (e) {
return {statusCode: 500, body: e}
}
Hi guys, when I try to use the STS(V3) to get the credentials, it always returns an error like below
Error: Credential is missing
at SignatureV4.eval [as credentialProvider] (runtimeConfig.browser.js?cb2b:15)
at SignatureV4.eval (SignatureV4.js?5fd9:169)
at step (tslib.es6.js?9ab4:100)
at Object.eval [as next] (tslib.es6.js?9ab4:81)
at eval (tslib.es6.js?9ab4:74)
at new Promise (<anonymous>)
at __awaiter (tslib.es6.js?9ab4:70)
at SignatureV4.signRequest (SignatureV4.js?5fd9:165)
at SignatureV4.eval (SignatureV4.js?5fd9:85)
at step (tslib.es6.js?9ab4:100)
And my code is
const REGION = 'us-east-1';
const client = new STSClient({ region: REGION });
const params = {
RoleArn: 'arn:aws:iam::12345678:role/test',
RoleSessionName: 'awssdk'
}
const command = new AssumeRoleCommand(params);
client.send(command).then(d => console.log(d)).catch(err => console.log(err));
do you have any ideas?
I am getting the same issue,
Error: Credential is missing
at SignatureV4.eval [as credentialProvider]
for
import { DynamoDBClient, ListTablesCommand } from "@aws-sdk/client-dynamodb"
(async () => {
const client = new DynamoDBClient({ region: "us-east-1" });
const command = new ListTablesCommand({});
try {
const results = await client.send(command);
console.log(results.TableNames.join("\n"));
} catch (err) {
console.error(err);
}
})();
and I have ~/.aws/credentials with aws_access_key_id, aws_secret_access_key, and aws_session_token. aws cli works fine, no idea why it can't find the credentials
@/all Please upgrade to Node.js >=10.x by 2021-10-31
The support for Node.js <10.x in the AWS SDK for JavaScript (v2) is going to end on 2021-11-01
const config = { region: "xx-xxxx-x" };
const client = new CognitoIdentityClient(config);
const credentialsRequest = new GetCredentialsForIdentityCommand({
IdentityId: `${config.region}:xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx`,
});
const credentialsResponse = await client.send(credentialsRequest);
@/all Please upgrade to Node.js >=10.x by 2021-10-31
The support for Node.js <10.x in the AWS SDK for JavaScript (v2) is going to end on 2021-11-01
its very weird because most of our web3 functions didn't work out at all in latest versions of nodejs, and the more stable is web3 the more it is unstable
Hello, Iam testing AWS Transcribe but can't get it working. I started with StartTranscriptionJob . This requires a string uri for Media, but I got a blob in Nodejs. Then I switched to StartStreamTranscription . But that requires an AudioStream.
Is there no API that allows you to send a blob and get the transcription?