aws-sdk-js-automation on master
Updates SDK to v2.1198.0 (compare)
aws-sdk-js-automation on v2.1198.0
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?
Hello,
Using AWS SDK v3, I have an EC2Client
which needs to send request to 2 different regions.
Note it should not happen concurrently, it depends on another configuration which can be switched at runtime.
EC2ClientConfig
used when creating the client allows us to pass the region as a Provider<string>
(Provider<T>
being () => Promise<T>
)
So we configured the client with a Promise based on our configuration.
And that works, at least to resolve the endpoint and so on.
The issue is when signing the request, the signin region is always the first region the client "saw".
Do you know how to fixes this, without having 2 clients ?