Questions tagged [aws-sdk-js]
The official AWS SDK for JavaScript provides an API to many AWS services, including: S3, SNS, SQS, EC2, Route53, etc... This library can be used in front-end Javascript which is executed in the browser as well as in NodeJS.
aws-sdk-js
754
questions
-1
votes
1
answer
29
views
How do I use the DynamoDB document client to set an attribute to a string representation of an integer?
I'm trying to use the AWS SDK for JS to set a DynamoDB item's attribute Password of type String to a string representation of an integer. This was my initial approach:
import { DynamoDBClient } from '@...
0
votes
0
answers
57
views
How to properly call AWS bedrock using JavaScript SDK?
I am a newbie to using JavaScript SDK to connect to AWS Bedrock service, below is my code:
const { BedrockAgentRuntimeClient, RetrieveCommand } = require("@aws-sdk/client-bedrock-agent-runtime&...
1
vote
0
answers
39
views
AWS SDK - Readable Stream Error while using CognitoIdentityProvider or any aws-sdk
When Trying to Access the Cognito Provider to Login in React Native, error as Reference Error - Readable Stream Not Found
Version Details
"react-native": "0.69.3",
"@aws-sdk/...
0
votes
0
answers
13
views
Uploading to AWS on ExpressJS takes a very long time when it is deployed on the server
I uploaded a file to AWS S3 with ExpressJS, but the upload time is very long about 15 seconds and above for a photo size of about 1MB. How to optimize / speed up the upload time
My program is as below:...
1
vote
1
answer
32
views
Saving PDF from S3 .pipe is not a function
I'm ultimately trying to attach a file from s3 without saving it to disc, but I'm having trouble getting the file in the first place.
Here is my code:
const s3 = require('@aws-sdk/client-s3')
...
0
votes
0
answers
19
views
Cannot import type interfaces of AWS js sdk v3
I am using AWS pinpoint service with typescript. And I want to define return type for GetSegmentCommand's output. The docs says that it is exported as this:
export interface GetSegmentCommandOutput ...
0
votes
0
answers
36
views
cognito srp auth login
This is my code. I am pretty sure i have used correct clientId and userpool for configuration.
the InitiateAuthCommand doesnot give me session key as mentioned in offical docs. But return all the ...
0
votes
0
answers
29
views
How could I List all the CommonPrefixes first with listObjectsV2?
I have a lambda function requesting data from S3 using AWS-SDK. It is consumed by a webapp used as a file directory, but when the app request to create a new folder or directory, it doesn't show until ...
0
votes
0
answers
45
views
InvalidCiphertextException: UnknownError at de_InvalidCiphertextExceptionRes
I am using the correct KMS key, but I keep getting the same 'InvalidCiphertextException' error.
This is my decryption code:
export const decryptField = async (encryptedField) => {
if (!...
0
votes
0
answers
64
views
error fetching Parameter from AWS parameter store Error: connect ECONNREFUSED XX.XXX.XXX.XXX:443
I am fetching values from AWS Parameter store and AWS Secret manager in my Node js application.
I am using these two dependencies -
@aws-sdk/client-secrets-manager", "@aws-sdk/client-ssm&...
2
votes
1
answer
106
views
AWS SDK V3 Lambda::InvokeCommand missing payload
This is about AWS SDK V3. The following code does not behave as expected:
import {
LambdaClient,
InvokeCommand,
LogType,
InvocationType
} from "@aws-sdk/client-lambda";
...
0
votes
1
answer
64
views
DynamoDB query works on CLI but not in Lambda: "Value null at 'key' failed to satisfy constraint"
On the CLI this works:
aws dynamodb query \
--table-name BatchTable \
--index-name completed_index \
--key-condition-expression "completed = :completed" \
--expression-...
0
votes
1
answer
28
views
S3 No 'Access-Control-Allow-Origin' header is present on the requested resource
I'm using JavaScript AWS SDK to upload a file to S3
const AWS = window.AWS;
AWS.config.update({
accessKeyId: this.credentials.AccessKeyId,
secretAccessKey: this.credentials.SecretAccessKey,
...
0
votes
0
answers
25
views
How to use the CredentialProviderChain in AWS-SDK version 3
I cant find any concrete information about this process, i have the next code but i cant find how is this gonna be translated to version 3
const AWS = require('aws-sdk');
AWS.CredentialProviderChain....
0
votes
1
answer
180
views
Retrieving secret string from secrets manager with nodejs
When a button is clicked, there should be an alert in the browser with the secret string (secret key and secret value)
This is my react app
const App = () => {
const handleFileUpload = async ()...