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

aws-sdk-js exists to help you interact with many AWS services (e.g. EC2, SQS, S3) programmatically in Javascript. This tag should be used for asking questions related to this official AWS SDK for Javascript.

Before asking questions, please make sure that you have reviewed the documentation provided by AWS. See the following important links:

702 questions
7
votes
1 answer

AWS EventBridge putEvents does not accept Detail JSON array

I am using AWS SDK v2.796.0 As per the documentation of putEvents, the Detail value needs to be a valid JSON string. https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEventsRequestEntry.html However, it is not accepting a JSON array…
7
votes
0 answers

How to get both DKIM and domain verification code using V2 of Amazon SES API

In order to complete SES domain verification I need 2 things: Verify the domain using Amazon SES domain verification TXT records Setup easy DKIM for the domain using CNAME DNS records Everything can be done via API as usual (I'm using SES API…
Yves M.
  • 29,855
  • 23
  • 108
  • 144
7
votes
2 answers

How many bits of integer data can be stored in a DynamoDB attribute of type Number?

DynamoDB's Number type supports 38 digits of decimal precision. This is not big enough to store a 128-bit integer which would require 39 digits. The max value is 340,282,366,920,938,463,463,374,607,431,768,211,455 for unsigned 128-bit ints or…
Justin Grant
  • 44,807
  • 15
  • 124
  • 208
7
votes
6 answers

Wait for AWS SNS publish callback to return a value to calling method

I am attempting to send a text message when a user requests to reset their password. I would like to wait for the message to be sent to alert the user if it was successful or not. I am currently attempting to do it as follows: async function…
havak5
  • 714
  • 1
  • 6
  • 20
7
votes
2 answers

How to enable Auto Scaling for Provisioned read capacity in DynamoDB from java script

I am using AWS SDK for nodejs and creating a dynamodb table from the code. It all works fine but i need auto scaling to be enabled for provisioned read and write capacity. This is the code i am trying var params = { TableName : "MyTable", …
Avijeet
  • 365
  • 4
  • 14
6
votes
1 answer

specifying the signature version of s3 client in aws sdk version 3

In aws-sdk v2 for javascript, we instantiate s3 client using: var s3 = new AWS.S3({ accessKeyId: 'YOUR-ACCESSKEYID' , secretAccessKey: 'YOUR-SECRETACCESSKEY' , s3ForcePathStyle: true, signatureVersion:…
juztcode
  • 1,196
  • 2
  • 21
  • 46
6
votes
1 answer

Error "URL.hostname is not implemented", AWS SNS in React Native Android

Using SNS service from the AWS SDK for JavaScript v3 in React Native When I try to create an endpoint (or execute really any command through AWS) I'm getting this error URL.hostname is not implemented I tried a number of other commands; same…
enesefuu
  • 369
  • 4
  • 14
6
votes
1 answer

What to use instead of new CognitoIdentityCredentials() in the new AWS-SDK.js V3?

So I'm migrating my project to the new AWS-SDK V3 because of it's modularity. However, I can't seem to figure out what to use instead of CognitoIdentityCredentials with the new API. This is what code looked like for V2: const credentials = new…
comonadd
  • 1,822
  • 1
  • 13
  • 23
6
votes
1 answer

Correct way to use AWS SDK within AWS CDK

I'm trying to use the SDK within my CDK application. My stack is creating a directory, some networking stuff, then some instances which it joins to the domain using a PowerShell script which requires the AD DNS IPs, I'm currently using it like…
6
votes
1 answer

AWS S3: MaxPostPreDataLengthExceeded Your POST request fields preceeding the upload file was too large

I am trying to upload a file to AWS S3, using AWS Javascript SDK's createPresignedPost method, I have the following code to generate the signed credentials for upload - let AWS = require('aws-sdk'); let util = require('util'); let s3Client = new…
Dev1ce
  • 5,390
  • 17
  • 90
  • 150
6
votes
2 answers

Send ArrayBuffer to S3 put to signedURL

I am progressively loading a file into a buffer, the buffer is valid, but the browser crashes when the ArrayBuffer is finished loading the file into it. What I need to do is to be able to send the pieces of the buffer buf = this.concatBuffers(buf,…
dhj
  • 4,780
  • 5
  • 20
  • 41
6
votes
1 answer

AWS Lambda using s3 getObject function nothing happening

This is the node.js code using the inline editor: const AWS = require('aws-sdk'); const s3 = new AWS.S3(); console.log('Loading function'); exports.handler = async (event) => { // TODO implement var responseMsg = ''; var bucket = ''; …
BermudaLamb
  • 273
  • 3
  • 5
  • 24
6
votes
2 answers

react-native - FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

I am struggling with the React Native and aws-sdk. The reason I use aws-sdk instead of aws-amplify is because: aws-amplify does not support Using a pre-signed URL to upload a file My project is working fine until aws-sdk is installed by npm and…
Luong Truong
  • 1,953
  • 2
  • 27
  • 46
6
votes
3 answers

How to retrieve multiple image from Amazon S3 using imgURL at once?

I want to retrieve list of images in one go from Amazon S3 based on image URL. Currently I am able to fetch single image using the following code:- AWS.config.update({ accessKeyId: accessKeyId, …
simple user
  • 349
  • 3
  • 22
  • 44
6
votes
1 answer

Nodejs AWS Lambda switching to another accounts access and secret key to perform functions

I am using Node with lambda and the AWS Javascript SDK. I have a role attached to the lambda function that allows the access I need to do. I want to be able to accept user input of access and secret keys and update my AWS config to perform new…
1 2
3
46 47