735 questions
0
votes
0
answers
62
views
Multipart uploading with s3/lib-storage failed after updating from v3.712 to v3.948
My multipart uploading service for my website (using Angular) failed immediately after updating s3/lib-storage from v3.7xx to vc.9xx. This service has failed before when updating to v3.8xx, so I ...
2
votes
1
answer
64
views
AWS AppConfig Multi-Variant flags always return default variant when passing context via SDK
AWS AppConfig Multi-Variant Feature Flags: Context Not Working (Always Returns Default Variant)
Problem
I'm trying to fetch AWS AppConfig Multi-Variant feature flags with user context from my React ...
2
votes
0
answers
48
views
CognitoIdentityProviderClient fails to construct URL from provided region
I'm trying to authenticate to AWS cognito using the @aws-sdk/client-cognito-identity-provider library
// Truncated code
import {
AuthFlowType,
CognitoIdentityProviderClient,
InitiateAuthCommand,...
0
votes
1
answer
48
views
SNS sending CreateTopicCommand I got Invalid parameter: DataProtectionPolicy Reason: Failed to parse the data protection policy
I created on aws a "Push notification platform - Apple iOS (development)"
I am just trying to create a new endpoint from AWS SDK JS v3
const deviceId = 'a0b1c2d3e4f5' // would be a real ...
0
votes
0
answers
44
views
aws-sdk-js requests stops responding after a while
What I'm doing:
From my node server I upload images to S3.
If a user upload an image with a name that already exists we will check if [image-name]-1 exists, if it does we check if [image-name]-2 ...
1
vote
2
answers
907
views
How to create presigned URL with AWS S3 JavaScript SDK imposing checksum verification
I am trying to create a predesigned POST request using the AWS Javascript SDK for S3, using the method createPresignedPost. The idea is to generate the URL and fields which should be used in a ...
0
votes
1
answer
67
views
cannot use method fileTypeFromStream in aws lambda typescript handler
Node version : node -v v20.17.0
packages versions :
"@types/aws-lambda": "^8.10.145",
"@aws-sdk/client-s3": "^3.678.0",
"file-type": "^19.6.0&...
1
vote
4
answers
252
views
How to share objects in a S3 folder and get links to them?
I upload files to a folder in an S3 bucket via the S3 JavaScript SDK. Now I want to share all objects in that folder (maybe there are more objects later) therefore I want to get a list of all objects, ...
0
votes
1
answer
564
views
Send raw email including headers using AWS SES
I'm trying to send a raw e-mail using AWS SES, with the AWS SDK v3 for Node.JS.
However, the e-mail I'm sending is appearing on the receiving end with the raw body enclosed in a HTML container, ...
0
votes
0
answers
39
views
Do we have to tell the instance at aws EC2 to move to next lifecycle state explictly?
I am doing autoscaling for updating ami images
what i am doing is
double the instances(new will have new instances have new ami)
new instances are up and running but i see that their lifecycle status ...
0
votes
1
answer
74
views
ListFunctionsCommand returns empty array
When I list functions using the CLI I get the expected results back, however when I try do the same thing from the Node SDK I get an empty array back.
I'm using SSO, where the SSO region differs from ...
-1
votes
1
answer
145
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
639
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
188
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/...
1
vote
1
answer
60
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
84
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
253
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 ...
1
vote
0
answers
173
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 (!...
2
votes
1
answer
516
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
461
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
57
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
1
answer
2k
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 ()...
0
votes
1
answer
308
views
AWS SDK Javascript v3 needing Node polyfills
I'm trying to use AWS Translate in my React app, and it seems to be needing a lot of Node polyfills. Is the AWS SDK intended for Node.js use only or do I just need to install like 12 polyfills? The ...
0
votes
2
answers
204
views
aws-sdk - inserting item into dynamodb table from lambda function result in error due item attribute type mismatch
I have a simple lambda function that is trying to insert an intem into a dynamodb table.
The said table has its PK of type string, I'm trying to insert a string in it, but I get an error that said I'm ...
1
vote
0
answers
690
views
PutObjectCommand with AWS SDK v3 fails with socket hang up error whereas putObject with AWS SDK v2 works
We recently started encountering a strange error in a process that was working fine earlier. In one of our lambda functions, we upload a file from ephemeral storage to an S3 bucket.
await s3Client....
1
vote
0
answers
260
views
Getting AccessDenied when trying to use PutObjectCommand from @aws-sdk/client-s3
I'm trying to upload file to an S3 bucket. This is part of my postbuild script.
Until 2 weeks ago it was working fine, then suddenly I started getting AccessDenied error.
I have generated new Access ...
0
votes
1
answer
589
views
How do I test the values used to instantiate an aws client?
I am updating a class typescript module to start using v3 of the aws-sdk.
In one of the methods I have the lines:
const eventBridgeClient = new EventBridgeClient({ region: this.region })
const ...
2
votes
1
answer
317
views
DynamoDB: Using SET on an UpdateExpression to increment a field is not working
I'm following the AWS docs in order to implement a lambda to increase the value of a field with an scalar value in DynamoDB. In my case I'm using NodeJS SDK v3, but the docs redirect you to this page ...
0
votes
1
answer
5k
views
AWS JavaScript SDK v3 : SignatureDoesNotMatch : The request signature we calculated does not match the signature you provided
I'm trying to setup a node.js app that will upload files to an S3 bucket. I keep getting this error:
SignatureDoesNotMatch : The request signature we calculated does not match the signature you ...
2
votes
1
answer
653
views
Is this a safe way to use aws-sdk on client side?
I have read different opinions so I'd like expert ones. My question is basic:
If I create a react app (only client side), from where I'm planning to read a s3 object, is the following a safe approach ...
0
votes
0
answers
116
views
DynamoDB documentClient.transactWrite throws ValidationException, but the datatype is correct
I rewrote some code to take advantage of the transaction API. When I try to update an object containing product information I get the following error:
ValidationException: ExpressionAttributeValues ...
3
votes
0
answers
149
views
aws js sdk -- unable to get local issuer certificate in local node script, but works just fine with aws cli
I am writing a helper to enable running a lambda function locally. There are DynamoDB and other calls to AWS services in this function. When I run my script, the aws-sdk says it cannot get the local ...
1
vote
0
answers
1k
views
Error: No value provided for input HTTP label: Bucket while putting a file in S3 with aws-sdv V3
I am getting error Error: No value provided for input HTTP label: Bucket while putting an object ( a file ) in S3 using AWS-SDK V3 apis in a nodejs service. Here is code I am using :
const ...
1
vote
2
answers
537
views
Updating aws-sdk v2 to v3 breaks DynamoDB call in Synthetics Canary
Interesting issue after updating to v3. The updated code works fine in tests, locally and in lambdas, but fails when running it within a Synthetics Canary. Might be an easy solution, but haven't found ...
1
vote
0
answers
126
views
Getting [Error: Credential is missing] using @aws-sdk/client-verifiedpermissions with AWS Cognito for getting Permissions
I am using the IsAuthorizedWithTokenCommand Command from @aws-sdk/client-verifiedpermissions to get authorization using the identity token generated by cognito, but i am getting the error: ...
0
votes
1
answer
1k
views
Getting [TypeError: Cannot read property 'apply' of undefined] - is the AWS V3 SDK compatible with React Native?
Background: I am investigating possible tech stacks for a project, so I am trying a bunch of things I'm not very familiar with. ( rough going, obviously )
I see Amazon recommends Amplify for React ...
0
votes
3
answers
516
views
AWS tries to read config from file system
I'm trying to send an email using AWS SES from a Supabase cloud function. I've set up the AWS env variables, but it still tries to read the config from filesystem, which fails 'cause there's no ...
1
vote
0
answers
181
views
aws sdk v3 lib-storage: upload file of 112 GB crash chrome for out of memory
I have bundled "@aws-sdk/lib-storage" and "@aws-sdk/client-s3" with webpack for use it on frontend
package.json
{
"name": "aws-s3-upload",
"version&...
1
vote
0
answers
338
views
Multer S3 (v3) type error when implementing AWS SDK (v3) - missing properties from type 'S3'
I'm in the process of upgrading my AWS SDK from v2 to v3 (@aws-sdk/client-s3 v3.496.0). This includes upgrading multer-s3 to v3.0.1 to be compatible as stated by their docs. But I'm getting the ...
1
vote
0
answers
168
views
When AWS STS credentials expire during upload
I received the sts credential from the server and using it to create an s3 object and upload it.
// aws sdk v2
// STS credentials
//{aws_access_key_id, aws_secret_access_key, aws_session_token, ...
0
votes
2
answers
523
views
AWS S3 Access and Secret Key management in React Native
I want to store my aws s3 access key and secret key in my react native app. I am storing it in env file and using it via react-native-config. But i received a mail from play console saying the key is ...
2
votes
0
answers
344
views
'The provided ARN is invalid' error when locally running a Step Function that calls EventBridge Scheduler
I am running a Step Function using the AWS JS SDK v3 that gets and creates schedules with AWS EventBridge Scheduler. When I run it in the AWS account, I am able to run the step function.
However, when ...
0
votes
1
answer
83
views
Cannot see the properties of CognitoUserPool Class from amazon-cognito-identity-js Nuxt3
I am using the amazon-cognito-identity-js library to create a new user in Amazon Cognito, but I cannot view the properties of the class CognitoUserPool.
My application is Nuxt3 using Pinia.
Steps that ...
1
vote
1
answer
1k
views
AWS S3 Javascript SDK v2 allows for full path but v3 does not. How can I access the files in S3 with a full path?
My application used to use AWS JavaScript SDK v2. In this version I could have a bucket name with slashes. The pattern of this bucket name is: <bucket_name>//. Essentially mocking a folder ...
0
votes
1
answer
432
views
Delete multiple files from digitalocean spaces using aws-sdk/client-s3
I want to delete multiple files from digitaloceans spaces but keep getting errors. Environmental variables are all set
My current code:
const { S3Client, DeleteObjectsCommand } = require("@aws-...
0
votes
0
answers
150
views
How to create temporary AWS credentials for lambda
This is in response to the post in How to pass aws credentials
I am trying to get temporary credentials that aws batch can assume by running a lambda script.
When I tested the lambda locally from AWS ...
2
votes
2
answers
990
views
Invoke AWS Lambda into React page using aws-sdk
I have this simple form executed into React page:
import React from 'react';
import { Link } from 'react-router-dom';
import {LambdaClient, InvokeCommand, LogType} from "@aws-sdk/client-lambda&...
0
votes
1
answer
1k
views
How to pass aws credentials
I am very new to react and I am building a UI from where I can trigger AWS Batch jobs.
In this process, I am using @awws-sdk/client-batch
import { BatchClient, SubmitJobCommand, CancelJobCommand, ...
0
votes
2
answers
897
views
How to filter in AWS Congito with multiple filter conditions in ListUsersCommand in Node.js?
We want to filter out the user list with multiple filter conditions, like on email and status in the node.js. Tried below filter condition but it did't work.
Code snippet of node.js
const client = new ...
0
votes
1
answer
411
views
Hitting Presigned URL to download object and get access denied exception
In our code base, we are aiming to render the S3 GetObject SignedURL for the client, so the client can download the object by clicking the url in the website .
Here is the v2 code:
return s3Client....