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
6
votes
1 answer

Upload file to S3 with PUT and form-data

I am trying to upload an image file (jpeg) to AWS S3 via the PUT interface, and I am getting the error SignatureDoesNotMatch. On my server, I have an Express node.js app with an endpoint to create a signed url. 'use strict'; const express =…
6
votes
2 answers

Is there a way to invoke AWS Lambda synchronously from node.js?

I'm trying to run a specific function from an existing app via AWS Lambda, using the JS SDK to invoke Lambda from my node.js app. Since I'm overwriting the existing function, I'll have to keep its basic structure, which is this: overwrittenFunction…
6
votes
1 answer

AccessDenied Invalid according to Policy: Policy Condition failed: ["starts-with", "$key", "2017/"]

I get the error I specified in the title. I try to do: Uploading Objects with Signed URLs with php the problem looks here: ['starts-with', '$key', 'test/'] ['starts-with', '$key', 'test/'] How does this work? in the bucket test folder…
emre
  • 63
  • 2
  • 7
6
votes
3 answers

aws-sdk complains about a cors header missing that actually exists

using webpack to run dev server, i'm trying to list items in an S3 bucket and console out the results using the javascript aws-sdk in the browser. when doing so i get this error: Cross-Origin Request Blocked: The Same Origin Policy disallows reading…
Pompey Magnus
  • 2,191
  • 5
  • 27
  • 40
6
votes
4 answers

How to abort/stop an Amazon AWS s3 upload in progress

I am using the javascript version of the aws sdk to upload a file to an amazon s3 bucket. code : AWS.config.update({ accessKeyId : 'access-key', secretAccessKey : 'secret-key' }); …
5
votes
3 answers

AWS JS SDK suddenly throws "The Access Key ID or security token is invalid."

Has anyone also noticed a change in behavior of the AWS JS SDK recently? Because I have a CI pipeline in Github Actions, in which a Local DynamoDB is started and written to the DyanmoDB using this docClient setup: const docClient = new…
5
votes
1 answer

What is the difference between @aws-sdk/client-ses and @aws-sdk/client-sesv2?

AWS's SDK for JavaScript version 3 seems to have 2 different clients for Simple Email Service (SES). I realized I have been using @aws-sdk/client-sesv2 but: The actual doc on their GitHub repos is really hard to understand (see v1 and v2) Nowhere…
Nicolas Bouvrette
  • 4,295
  • 1
  • 39
  • 53
5
votes
0 answers

How to Stream Video to "Kinesis Video Stream" from phone camera accessed on browser using Javascript

Use case: Multiple users login into the web portal to stream video over a web browser using their phone camera. The phone Camera (Producer) is accessed using HTML5/Javascript, which streams the video to KVS (Kinesis Video Stream), there are multiple…
5
votes
1 answer

AWS SQS List Triggers from SDK

I'm looking for a method to programmatically identify the triggers associated with an SQS queue. Looking through the SQS sdk docs, it doesn't seem this is possible. I had thought instead to try from the other end, and it appears the Lambda…
shortstuffsushi
  • 2,271
  • 19
  • 33
5
votes
1 answer

Can you specify origination number on SMS send? (aws-sdk-js)

I saw that it's now possible from the AWS website (https://aws.amazon.com/about-aws/whats-new/2020/10/amazon-sns-now-supports-selecting-the-origination-number-when-sending-sms-messages/), but couldn't find anything related to it for aws-sdk-js
Scrandre
  • 141
  • 8
5
votes
1 answer

Using AWS Glue Schema Registry for Node.js or Ruby on Rails

Looking at the documentation for AWS Glue Schema Registry it seems like you can't use it for Node.js or Ruby on Rails: The AWS Glue Schema Registry supports AVRO (v1.10.2) data format and Java language support, with other data formats and languages…
Sandip Subedi
  • 1,039
  • 1
  • 14
  • 34
5
votes
2 answers

S3 getSignedUrl v2 equivalent in AWS Javascript SDK v3

I just started using aws-sdk on my app to upload files to S3, and i'm debating whether to use aws-sdk v2 or v3. V2 is the whole package, which is super bloated considering i only need the s3 services, not the myriad of other options. However, the…
xunux
  • 1,531
  • 5
  • 20
  • 33
5
votes
1 answer

AWS: Unable to login into aws-sdk using sso credentials

I am trying to access AWS resources with AWS-SDK using SSO credentials from the node.js application. For this, first I have created my SSO profile from AWS CLI and then I am trying to use same profile in the application I have tried using following…
5
votes
1 answer

S3 ManagedUpload equivalent in aws javascript sdk v3?

In the older version of javascript I was using managedupload function for uploading big files to s3, which will do the queueing and manage multiparting of files. But in V3 this function is not anywhere in documentation, is that removed? or is there…
vinith p
  • 53
  • 4
5
votes
2 answers

How do I set a timeout for AWS V3 Dynamo Clients

I have started using the new AWS Version 3 sdk for some of my services. Unfortunately it is not always clear how to use some features in the modular version 3 code that are available in the Version 2 sdk. To set timeouts for the non-modular sdk, you…
ORcoder
  • 252
  • 2
  • 11