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

Wrong aws request signature caused by opentelemetry https plugin

When using the @opentelemetry/plugin-https and the aws-sdk together in a NodeJS application, the opentelemetry plugin adds the traceparent header to each AWS request. This works fine if there is no need for retries in the aws-sdk. When the aws-sdk…
5
votes
1 answer

Cloudfront exception "The If-Match version is missing or not valid for the resource." when updating distribution

When updating a Cloudfront distribution using the AWS Node SDK I get the following exception: message: 'The If-Match version is missing or not valid for the resource.', code: 'InvalidIfMatchVersion', time: 2020-08-23T19:37:22.291Z, …
5
votes
0 answers

How to use CognitoIdentityCredentials when importing only required clients?

As aws-sdk is huge to use at browser side, and also that I'm using Webpack, so it made more sense to only include clients which I'm using (like import S3 from 'aws-sdk/clients/s3'). However I'm failing to configure the credentials for clients like…
Ajit
  • 875
  • 1
  • 10
  • 20
5
votes
2 answers

How to get AWS SQS queue ARN in nodeJS?

I'm trying to build an application with a basic client-server infrastructure. The server infrastructure is hosted on AWS, and when a client logs on, it sends a message to the server to set up various infrastructure considerations. One of the…
Ertai87
  • 1,156
  • 1
  • 15
  • 26
5
votes
2 answers

"Error: Received packet in the wrong sequence." when connect to serverless aurora

I'm implementing a web application and it calls lambda function to get data from database. I chose Serverless Aurora and wrote a code, but I get the exception "Error: Received packet in the wrong sequence." in query method. I googled this issue…
anizo
  • 237
  • 4
  • 14
5
votes
1 answer

Subscribing and getting notifications from SNS in angular5

I am doing simple test application in Angular5 which will read notifications coming from Amazon SNS topic and will display it on the UI. I will publish messages into topic manually. But the problem is How I can subscribe to it from Angular app…
5
votes
7 answers

aws-sdk NodeJS reading credentials from environment variables

I am running a NodeJS application that uses the aws-sdk library. I have the following environment variables exported: AWS_ACCESS_KEY_ID=XXXXXXXXXXXXX AWS_SECRET_ACCESS_KEY=XXXXXXXXXXXXXXXXXXXX I can verify they are set correctly by running the env…
Jack Gore
  • 3,874
  • 1
  • 23
  • 32
5
votes
2 answers

TypeError AWS.KinesisVideo is not a constructor

I installed aws-sdk using the below command npm install --save aws-sdk and i get an error TypeError AWS.KinesisVideo is not a constructor for the below code var kinesisvideo = new AWS.KinesisVideo(); AWS.IAM is not a constructor JavaScript SDK…
J28
  • 1,080
  • 3
  • 15
  • 25
5
votes
2 answers

AWS-SDK Load Error in AWS Lambda function using NodeJS

I am creating new lambda functions using nodejs. And this lambda functions works well without aws-lambda. But when I require 'aws-sdk' package, it occurs the error and stop running. The error is that they can't require the 'aws-sdk' package. But…
5
votes
1 answer

How to receive a response from AWS S3 triggered lambda function?

I currently have a setup where my mobile front-end performs an AWS s3 upload of an image. The s3 upload triggers a AWS lambda function that starts a AWS step-function (state-machine) which performs various jobs and actions. I am looking for the best…
5
votes
3 answers

How to configure the region in the AWS js SDK?

My problem I am writing a simple js function that reads some information from AWS CloudWatch Logs. Following the answer at Configuring region in Node.js AWS SDK, and the AWS nodejs SDK documentation, I came up with the following: Code var AWS =…
Adam Matan
  • 128,757
  • 147
  • 397
  • 562
5
votes
4 answers

Error while running a Node js program

I have written a node js program which contained a method called AWS.config.update(). When I tried to run it on terminal, I got an error: Error: Cannot find module 'aws-sdk'
Lisa
  • 655
  • 3
  • 10
  • 34
4
votes
1 answer

Why does the Cost Explorer Client show wrong results when I have AWS credits?

When using AWS Console --> AWS Cost Management --> Cost Explorer - I get the following values: When I use @aws-sdk/client-cost-explorer I get different results for 'EC2 - Other' and 'Amazon Load Balancer'. Configuration: import {…
4
votes
0 answers

URL.hostname is not implemented

I'm looking for some help on my textract client project. I am trying to follow the AWS Textract documentation, but I am stuck at the textractClient.send(). I am getting the error URL.hostname is not implemented I have followed the steps on AWS to…
4
votes
1 answer

DynamoDB ExclusiveStartKey error The provided starting key is invalid

Well hello fellas, i'm starting in dynamodb and i have some missunders when i want to use the ExclusiveStartKey.currently im working with the GSI and heres is how i have the params for the query { TableName: 'Search', IndexName: 'GSI1', …
Adal Zayas
  • 43
  • 1
  • 3