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
4
votes
2 answers

How do I presign url of PutObjectCommand with certain headers?

I am new to aws-sdk and I want to sign Cache-Control, Content-Type and x-amz-acl headers for presigned url. Is it possible to do with s3-request-presigner? I can't find any example. var command = new PutObjectCommand({ Bucket: 'mybucket', Key:…
4
votes
1 answer

AWS api call with aws4fetch package in cloudflare workers?

I'm not able to call AWS Api's using aws4fetch. Could someone giveme an example on how to call S3 putobject using cloudflare workers ?
madruga
  • 104
  • 1
  • 8
4
votes
1 answer

ListObjectsV2 - Get only folders in an S3 bucket

I am using AWS S3 JS SDK. I have folders within folders in my S3 bucket and I would like to list only folders at a certain level. This is the…
Jan Horčička
  • 671
  • 1
  • 11
  • 26
4
votes
1 answer

Make S3 Object public when uploaded by client-s3 Typescript library

I am uploading files to S3 using Typescript code as follows: import {PutObjectCommand, PutObjectCommandInput, S3Client} from "@aws-sdk/client-s3"; const s3 = new S3Client(config); const uploadParams: PutObjectCommandInput = { …
onkami
  • 8,791
  • 17
  • 90
  • 176
4
votes
1 answer

How to provide instance identity document for registering the container instance to AWS ECS Cluster using AWS Javascript SDK?

I'm using AWS Javascript SDK to create a cluster and register the container instance for ECS task. I got struck by providing the instance identity document value for the request parameters. I'm trying to register my running EC2 instance as container…
4
votes
1 answer

How to constrain video size in AWS Elemental MediaConvert?

I wanna achieve the same exact CSS behavior of: background-size: contain. But all I am able to choose from is either letterboxing or stretching: How do we maintain aspect ratio when we provide both width and height as constraints?
4
votes
1 answer

Multiple file upload to S3 with Node.js & Busboy

I'm trying to implement an API endpoint that allows for multiple file uploads. I don't want to write any file to disk, but to buffer them and pipe to S3. Here's my code for uploading a single file. Once I attempt to post multiple files to the the…
josiahwiebe
  • 151
  • 1
  • 9
4
votes
1 answer

CloudWatch Events scheduled from Lambda function

I've tried to setup scheduling with Amazon CloudWatch Events, which should invoke a Lambda function, from another Lambda I used guide from Sending Events to Amazon CloudWatch Events - AWS SDK for JavaScript. The problem is, that even after setting…
4
votes
2 answers

AWS JS SDK V3 (Lambda module) - Unable to connect to instance metadata service

I was previously using the all-in-one aws-sdk npm module (https://www.npmjs.com/package/aws-sdk) to invoke an AWS Lambda function, and for that the following code had been working well: //Some code to get "credentials" ... …
Divyansh Goenka
  • 997
  • 2
  • 12
  • 35
4
votes
1 answer

Invoking lambda to lambda 22 times concurrent taking too much time

I am invoking lambda_B 22 times(asynchronously) from lambda_A, Single lambda_B call completes execution in 3 sec so according to this when i am invoking 22 lambda asynchronously so it should take time around 3 sec. But its taking time 16-20 sec…
Aabid
  • 953
  • 5
  • 23
4
votes
0 answers

Integrate a single AWS SDK JS for browser service with webpack and Typescript

I have a Vue.js project, that I have integrated with Typescript and webpack. Everything is great. I am adding a simple SNS message service, so I integrated the AWS SDK. All seems well, but obviously, I do not want to bundle the entire AWS SDK if I…
Guillermo Alvarez
  • 1,695
  • 2
  • 18
  • 23
4
votes
3 answers

AWS SDK for node.js not picking up credentials when running in ECS

I have this code: const uploadAllToS3 = () => { console.log("upload useless file to s3, just to test access rights"); new AWS.S3().putObject({ Bucket: scheduledJobsConstants.s3BucketName(), Key: `test/${new Date()}.txt`,…
4
votes
1 answer

What should be done when the provisioned throughput is exceeded?

I'm using AWS SDK for Javascript (Node.js) to read data from a DynamoDB table. The auto scaling feature does a great job during most of the time and the consumed Read Capacity Units (RCU) are really low most part of the day. However, there's a…
3
votes
2 answers

Access Location when uploading File to AWS S3 using @aws-sdk/lib-storage

I'm currently in the process of upgrading my project from SDK v2 to V3 and I'm struggling to access the location URL of the file I'm uploading to my S3 bucket. Currently the below implementation is unable to access location since it does not exist…
Jamie Hunt
  • 85
  • 2
  • 6
3
votes
0 answers

Upgraded to aws-sdk v3 but still getting v2 maintenance mode warning message

Ive upgraded my application to use aws sdk v3 for the ssm service by following the documentation here: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-ssm/ const { SSMClient, GetParametersCommand } =…
Kelly
  • 59
  • 2