546 questions
0
votes
1
answer
62
views
Can't get a row from dynamoDB by id
I’m seeing a weird intermittent read issue with DynamoDB using the AWS SDK for JavaScript v3. For some (but not all) item IDs, the first call to GetItem returns no item, and the second call ...
0
votes
1
answer
61
views
Unable to fetch an item in AWS DynamoDB
Environment:
NodeJS used with "aws-sdk": "^2.1692.0" to test DynamoDB operations
Goal:
To fetch an item in an exsiting table called CUSTOMER_LIST which contains a list of items.
...
0
votes
1
answer
81
views
Is it possible to list my HTTP and WebSocket APIs using the `@aws-sdk/client-api-gateway (v3)` package
I am new to using AWS's API Gateway. I have created a few APIs in the web console and I am looking to writing (node) scripts to manage my APIs for things such as deployments.
I have installed (npm ...
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
100
views
find if partition key exists in dynamodb
I need to check if a partition key exists (email) in a dynamodb table
I am using an astro action with typescript and the error it returns is:
ValidationException: The provided key element does not ...
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
1
answer
265
views
TypeError: Converting circular structure to JSON - while reading json file data from s3 in Node 18
I am getting TypeError: Converting circular structure to JSON error while reading json file content from s3 using node 18. I am using S3Client, GetObjectCommand of @aws-sdk/client-s3.
TypeError: ...
3
votes
1
answer
192
views
Nextjs build failed because of aws-sdk webpack errors
I am trying to build my nextjs project but facing below error.
./node_modules/.pnpm/@[email protected]/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/s3-express/functions/...
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
46
views
AWS creadential provider using strings
Is there are way to directly provide aws credentials as strings to AWS CredentialProvider using aws JS SDK v3?
I am using the following code, and instead of using environment variables, I want to ...
0
votes
1
answer
44
views
How do I filter a query of an array of strings with a limit in DynamoDB pagination?
When combining Limit and Filter Expression in DynamoDB, the database first retrieves the first N items specified by Limit and then applies the Filter Expression to those items. It's important to note ...
0
votes
1
answer
97
views
How do I update the AWS API Gateway WebSocket chat app tutorial from aws-sdk v2 to v3 and Node.JS v16 to v18?
The AWS documentation (also archived) currently stops at Node.JS v16, which is EOL upstream. Unfortunately there's no simple way to get Node v16 with @aws-sdk v3 or Node v18 with aws-sdk v2, the ...
0
votes
1
answer
47
views
DynamoDB NodeJS V3 SDK Set type not
I am migrating from the V2 to the V3 SDK and I have some Set type data in DynamoDB that looks like this:
"hitCount": {
"NS": ["5", "4", "3", &...
0
votes
1
answer
127
views
How to force DynamoDB to use List<Sting> instead of Set<String>
When I insert a string array column the AWS SDK insert a sring set.
Is there a way to force DynamoDb to use List instead?
{
"pk: "test",
"tests": ["a", "...
1
vote
0
answers
308
views
HTTP content length exceeded 10485760 bytes
This is the error I encountered HTTP content length exceeded 10485760 bytes while uploading to s3.
I'm trying to upload image and video. How do I upload image and video above greater than 10mb in size?...
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
795
views
instanceof ServiceException (@smithy/smithy-client) does not work as general aws-sdk exception
I had this code:
try {
return await this.client.send(command, options)
} catch (error: unknown) {
if (error instanceof ServiceException) {
throw this.handleError(error)
}
throw ...
0
votes
1
answer
356
views
AWS Lambda nodejs SDK V3 Payload Parse Issues
Recently been updating my jobs Lambda code to nodejs18.x in response to the deprecations coming this summer and took the opportunity to upgrade the aws sdk version to 3 since the 18.x runtime doesn't ...
0
votes
1
answer
235
views
Mock AWS S3 Select Response with Jest and AWS SDK V3
I am using S3 Select to query the CSV file and extract the rows out of it in my nodejs application. How to write a unit test to mock the response of the SelectObjectContentCommand.
The response is of ...
1
vote
1
answer
2k
views
Upgrading AWS Lambda Scripts from Node.js 16.x to 18.x with Minimal Changes
I have a collection of 15-20 scripts running on AWS Lambda with Node.js 16.x that perform various operations, including interacting with S3 using functions like copy, headObject, putObject, and ...
0
votes
0
answers
89
views
Getting Access Denied Error in production on uploading to AWS S3 bucket
I have an EC2 instance running that has my NodeJs backend, it was running fine until a few days, when i try to upload an image it gives me access denied error, but the same code when run on my local ...
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 ...
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 ...
0
votes
0
answers
49
views
Why is PrivateWorkForce on AWS failing to delete?
I'm trying to create an AWS Custom Labels Cloudstack via the template provided by AWS:
https://ml-specialist-sa-demo-us-east-2.s3.us-east-2.amazonaws.com/custom-brand-detection/1.0.0/amazon-...
0
votes
1
answer
438
views
sns nodejs publish to a specific phone
I recently developed a project that needs to send a text message, Amazon's sns, with the old version I could send it smoothly, but with the new one I'm not able to send it to a PhoneNumber (I can ...
1
vote
0
answers
46
views
How to map EC2 instance to the correct product entry from the Price List Query?
From using the AWS-SDK, I am unsure of how to map the Instance information to the applicable product entry from the Price List Query.
I am using NodeJS @aws-sdk/client-ec2 and @aws-sdk/client-pricing. ...
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
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
306
views
Query Redshift from NodeJS Express app (@aws-sdk/client-redshift-data)
I have a simple Express app and I am trying to figure out how to get data from AWS Redshift using the "@aws-sdk/client-redshift-data" module.
Following the example code from the module's ...
1
vote
1
answer
579
views
TypeError: UpdateCommand is not a constructor - AWS SDK v3 for nodejs unit test with jest
I keep getting "TypeError: UpdateCommand is not a constructor" when the unit test reaches the stage where it is calling the UpdateCommand from @aws-sdk/lib-dynamodb. I think it is the mock ...
2
votes
2
answers
926
views
aws lambda Cannot find package aws-jwt-verify
I have been implementing an AWS lambda function (node.js v18) which already worked with the following dependencies in package.json
"@aws-sdk/client-apigatewaymanagementapi": "^3.428.0&...
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&...
2
votes
0
answers
1k
views
Logging JavaScript Calls in AWS SDK V3
I am using AWS SDK v2 in Node.js application where I use the AWS.config.logger = console; code to get the output of all AWS SDK call in the below format
[AWS s3 200 0.185s 0 retries] ...
0
votes
1
answer
514
views
Importing `@aws-sdk/client-bedrock-runtime` into AWS Lambda function with Nodejs18 runtime
I'm trying to import @aws-sdk/client-bedrock-runtime into an AWS Lambda function using NodeJs18 runtime.
This package should be available, because according to AWS docs, "For Node.js versions 18 ...
-1
votes
1
answer
258
views
Output from Photoshop API to signed URL on S3 fails with 403 Access is forbidden error
When I am using the AIO library and I try to create a rendition using the createRendition call I am getting the following error:
{
code: 403,
details: [
{
name: 'https://s3.amazonaws.com/...
-1
votes
1
answer
639
views
Lambda function Cannot read properties of undefined (reading 'bucket')
Lambda not getting event details on s3 notification object create with SNS topic
Lambda not getting event details on s3 notification object create with SNS topic
I have created an AWS SNS topic and ...
1
vote
2
answers
2k
views
AWS JS SDK S3 HeadObject command throws error "check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly"
I am deploying a lambda function through CDK. The function uses the AWS SDK for Node.js to send a HeadObject request to a multi region access point (MRAP).
When I send this HeadObject request, the AWS ...
0
votes
1
answer
1k
views
Inaccessible host: `freetier.us-east-1.amazonaws.com' at port `undefined'. This service may not be available in the `us-east-1' region
I'm trying to call AWS Free Tier API from a Lambda function, but I'm getting this error:
Inaccessible host: `freetier.us-east-1.amazonaws.com' at port `undefined'. This service may not be available in ...
2
votes
1
answer
1k
views
How to get temporary credentials with AWS Roles Anywhere programmatically w/ Node.js?
I have a non-AWS workload that needs to access the AWS API. Using IAM Roles Anywhere to generate temporary credentials as opposed to using long-term credentials (e.g. access keys) is recommended by ...
0
votes
1
answer
700
views
How to access Feature Flags from AWS AppConfig with TypeScript project?
I'm encountering an issue with my TypeScript application using the AWS SDK. My goal is to get the Feature Flag I created from my AWS AppConfig. The error message I'm seeing is:
Error getting AppConfig ...
0
votes
1
answer
258
views
What is the difference between "amazon-dax-client" and "@aws-sdk/client-dax"?
Can either of them be used to configure dax client and perform operations on it?
I wasn't able to use "@aws-sdk/client-dax" to configure client and perform getItem command.
const { DAXClient,...
1
vote
0
answers
471
views
Accessing AWS Secret Manager With Assumed Role
I am using the following to authenticate my aws-sdk (v3) requests in my React app:
const options = {
region: 'us-east-1',
credentials: fromCognitoIdentityPool({
identityPoolId: ...
4
votes
3
answers
4k
views
Getting error while using @aws-sdk/client-sqs in node.js
While using the sendMessage method of SQS getting the following error
error SyntaxError: Unexpected token T in JSON at position 0 Deserialization error: to see the raw response, inspect the hidden ...
0
votes
1
answer
82
views
Difference between DescribeJobExecutionCommand in AWS SDK Iot and Iot-Jobs-Data-Plane?
I am working with AWS SDK for Javascirpt and notice that both iot and iot-jobs-data-plane services has a command called "DescribeJobExecution" that return the current status of a job ...
1
vote
1
answer
811
views
How can we inject the claims through the custom authorization lambda
Previously we used the authorizer type as cognitouserpool so when we send an request to the customAuthorization added API endpoint means in that API event we get the requestContext object inside ...
1
vote
0
answers
110
views
How to use getLoggerPlugin() in @aws-sdk/middleware-logger?
I see this function is used at many places in the v3 clients, For example here is there any proper usage documents?
0
votes
0
answers
304
views
Using Verified Permissions with Cognito access token
I am looking to use Verified Permissions as a tool for authentication and authorization.
I am using the function isAuthorizedWithToken(params = {}, callback) ⇒ AWS.Request.
Verified Permissions ...
1
vote
0
answers
136
views
AWS Credential Error in Runtime using JavaScript AWS SDK v2.784.0
I'm encountering an AWS credential error when using the aws-sdk version 2.784.0 in a JavaScript runtime environment. The error message is as follows:
Error: Missing credentials in config, if using ...