Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • 09:33
    Tom-O-Chan commented #4124
  • Nov 30 23:33
    sashashura commented #4211
  • Nov 30 23:31
    sashashura commented #4211
  • Nov 30 19:23

    aws-sdk-js-automation on master

    Updates SDK to v2.1265.0 (compare)

  • Nov 30 19:23

    aws-sdk-js-automation on v2.1265.0


  • Nov 30 12:13
    idanya closed #4293
  • Nov 30 11:42
    idanya labeled #4293
  • Nov 30 11:42
    idanya labeled #4293
  • Nov 30 11:42
    idanya opened #4293
  • Nov 30 10:52
    yhaskell commented #4151
  • Nov 30 09:07
    phongvuhyuet commented #2981
  • Nov 30 00:13
    github-actions[bot] closed #3859
  • Nov 30 00:13
    github-actions[bot] labeled #3859
  • Nov 30 00:13
    github-actions[bot] unlabeled #3859
  • Nov 29 23:31
    ajredniwja assigned #4290
  • Nov 29 23:31
    ajredniwja labeled #4290
  • Nov 29 23:31
    ajredniwja labeled #4290
  • Nov 29 23:31
    ajredniwja unlabeled #4290
  • Nov 29 23:31
    ajredniwja commented #4290
  • Nov 29 20:15
    OneHoopyFrood commented #1997
Michał Kłoda
Hi everyone. I have dynamodb table and I would like to run post deployment script to populate table by some data. Any thoughts how it can be done?
Prashant Singh

Hi everyone, I want to create image manipulation on the image fetched from the AWS S3 and would like to perform manipulation action on it. I am using stream to solve the problem of loading big files.

import AWS from 'aws-sdk'
import sharp from 'sharp'

const s3 = new AWS.S3()
const transformer = (w, res, next) =>
        .on('data', (data) => {
            res.write(data, 'binary')
        .on('error', (err) => next(err))
        .on('end', () => {

const readStream = s3
        Bucket: process.env.UPLOAD_BUCKET_NAME,
        Key: 'test.jpg'

const getImage = (w, res, next) => {
    readStream.pipe(transformer(w, res, next))
    readStream.on('error', (err) => next(err))

export default getImage

I am calling the getImage method on the route and this function serves images for the first time but when the second time the Image is requested, it throws Error: Input buffer contains unsupported image format

Jairo Campos Vargas
Hi, guys, I have a question I am using getCostandusage js SDK, I wanted to get all the charges with this filter "Other out-of-cycle charges" but I did not find the machine name to put into the RECORD_TYPE filter do you know what is this name ?
Jairo Campos Vargas
ok I found it, it's Other
Hi guys, how do you get an access token to call changeUserPassword for cognito?
Hi guys, I'm not able to find a solution to this problem: https://stackoverflow.com/questions/63741402/aws-lambda-usermigration-forgotpassword-trigger-not-migrating-users any help would be awesome! Thanks a lot!
Can anyone please shed some light what is the significance of $response.error in the response object when using .promise() variant. I am assuming that SDK will throw in every case of error, or is it not the case? Do I ever need to check $response.error or should I assume if the promise resolved, then everything is a-ok? Thanks.
Talha Javaid Malik
Can anyone please tell me why my terminal showing this error message? SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your key and signing method
Dear all, I appreciate your support, I want to use Node.js SDK to perform some tasks on AWS, for example:
  • I want to list my account information
  • List my regions
  • List my resources per region
    any guidelines where should I start?
Lachlan Vass
Hey @iamnns - sorry for the late reply. I only just joined this chat, but can offer some insight. I would start by looking at the Organizations section of the SDK (https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Organizations.html)
I am pretty sure that will allow you to complete the first two points on your list. As for listing resources per region, I am not really sure where to look. I know it is weirdly difficult to look at the resource in an AWS account which have been "set up" by a user at some point. All the resources are available, but not all are in use at a given time. Maybe Resource Groups would be a good place to start? (https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/ResourceGroups.html)
Nare Sai Chaitanya
@Talha089 Can you provide more info about the issue by sharing the http response
Hi All, am trying to get results from cloudwatchlogs using GetQueryResults, but cant figure out how to wait till the status reaches complete. Dont want to use SetTimeout. Is there a graceful way to achieve this other than SetTimeout? Any help is appreciated.
Usama Tahir
Hi all, I used this tutorial (https://coderwall.com/p/j5nk9w/access-ec2-linux-box-over-ssh-without-pem-file) to access ec2 instance without .pem file.
Now what I want is to access ec2 only when I have .pem file. How can I reverse the process done by the tutorial above?
2 replies
hey guys, sorry new here and noob question. When I use initializeAuth with REFRESH_TOKEN_AUTH or REFRESH_TOKEN, response only includes authToken, type, idtoken and expiration. Documentation says it also returns refreshToken. Is there something I am missing?
         const params = {
                UserPoolId: this.userPoolId,
                ClientId: this.clientId,
                AuthFlow: 'REFRESH_TOKEN',
                AuthParameters: {
                    REFRESH_TOKEN: request.body.refresh_token

            const cognito = new AWS.CognitoIdentityServiceProvider();

            const response = await cognito.adminInitiateAuth(params).promise();
I have the assumption, from OAUTH2, each time you retrieve an access token, your refresh token also gets regenerated and expiration starts from new generation time. Is that not the case for aws cognito? meaning, if user signs in today, refresh token is valid for 30 days, and no matter what they have to login again after 30 days, even though they actively used the application that period?
both adminInitateAuth and initateAuth requests returns same response with REFRESH_TOKEN or REFRESH_TOKEN_AUTH parameters in AuthFlow
Ronique Ricketts
Hello guys I have a question regarding aws workmail
Hi Team, Any body have idea on how to initialize AWS.Connect() with Amazon connect endpoint.
Daniel Schultz
Hey all -- is this project still maintained? I have an open bug report and offer to patch but it's been sitting there for about 12 days. aws/aws-sdk-js#3486
Niraj Palecha
Does aws-sdk-js cache sts.assumeRole credentials? and return cached credentials when invoked with the same args?
hello guys, I am looking for a way to implement websocket with always-free services, is that possible? thank you in advance 🙏
Benjamin Baratte
Hi All, I'm trying to use the aws-iot-device-sdk-js-v2 to connect to AWS IoT core with a secure element to hold the private key. On NodeJS, this is possible to use an OpenSSL engine to use the private key during TLS handshake. I would like to know if this is possible to do so with aws-iot-devive-sdk-js-v2 which use the aws-sdk-js for the low level TLS connection. Unfortunately, I'm getting lost in the code analysis so I'm not sure if it's rely on NodeJS TLS component or not.
Hi, hope you're doing well.
I have a question, can I use aws-sdk on angular ? I mean without using in nodeJS and upload images from angular only? because we have a RUST backend and I want to upload images from the front-end directly, not sending to backend and uploading from there
we did it and it gives us CORS error for preflight response. (aws-s3 for getting bucket list or uploading image to a bucket)
ziwei wu
Hey guys, how do I check if an record is not existed in dynamoDB table?
This my current code but it's returning 502 for some reason.
 try {
    const response = await dynamo.get(params).promise()

        "dynamoResponse: " + JSON.stringify(response, undefined, 2));

    if (JSON.stringify(response.Item) === {}) {
      console.log("Got Empty response, returning 404")
      return {
        statusCode: 404, body: "error: display preference is not found"
            + " for the user"

    return {statusCode: 200, body: JSON.stringify(response.Item)}
  } catch (e) {
    return {statusCode: 500, body: e}
I am using dymamo.DocumentClient btw.
ziwei wu
Nvm, I figure it out, we need to check for JSON.stringify(response) === '{}'
Guillaume Duparquet
Hi there ! I'm having a weird issue: We're doing end-to-end testing using dynamodb-local docker image, my colleagues and the CI are going through it without any troubles, but I'm getting an "ValidationException: ExpressionAttributeValues contains invalid value: One or more parameter values were invalid: An AttributeValue may not contain an empty string for key" exception. After a quick search, it appears to be an old behavior of the dynamodb client that has been changed in latest versions. But I'm still getting this error despite the fact that I'm using the .
I tried removing node_modules folders, deleting yarn.lock file, removing/updating aws cli, made sure I was on the same nodejs version.
Any idea of what the issue can come from ?
Guillaume Duparquet
Can't edit my first message, wanted to give the info that I use v2.817
Drew Miller
Anyone tried using AWS SDK v3 with Kinesis to listen to events using an enhanced fanout consumer? :fingers-crossed: It seems like there is a bug, and the subscribeToShardCommand never completes.
The HTTP/2 connection seems to finish, but the callback never happens.

Hi guys, when I try to use the STS(V3) to get the credentials, it always returns an error like below

Error: Credential is missing
    at SignatureV4.eval [as credentialProvider] (runtimeConfig.browser.js?cb2b:15)
    at SignatureV4.eval (SignatureV4.js?5fd9:169)
    at step (tslib.es6.js?9ab4:100)
    at Object.eval [as next] (tslib.es6.js?9ab4:81)
    at eval (tslib.es6.js?9ab4:74)
    at new Promise (<anonymous>)
    at __awaiter (tslib.es6.js?9ab4:70)
    at SignatureV4.signRequest (SignatureV4.js?5fd9:165)
    at SignatureV4.eval (SignatureV4.js?5fd9:85)
    at step (tslib.es6.js?9ab4:100)

And my code is

const REGION = 'us-east-1';
const client = new STSClient({ region: REGION });
const params = {
  RoleArn: 'arn:aws:iam::12345678:role/test',
  RoleSessionName: 'awssdk'
const command = new AssumeRoleCommand(params);
 client.send(command).then(d => console.log(d)).catch(err => console.log(err));

do you have any ideas?

Kevin Song

I am getting the same issue,

Error: Credential is missing
    at SignatureV4.eval [as credentialProvider]


import { DynamoDBClient, ListTablesCommand } from "@aws-sdk/client-dynamodb"

(async () => {
  const client = new DynamoDBClient({ region: "us-east-1" });
  const command = new ListTablesCommand({});
  try {
    const results = await client.send(command);
  } catch (err) {

and I have ~/.aws/credentials with aws_access_key_id, aws_secret_access_key, and aws_session_token. aws cli works fine, no idea why it can't find the credentials

Pavel Vaysberg
Hi :wave: Does anybody know how to set caching on ECS task metadata response? My application is running into rate limiting issues
hi guys, im getting an error when trying to install aws-sdk in visual studio
'awsk-sdk@latest' is not in the npm registry.'
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/awsk-sdk - Not found
npm ERR! 404
npm ERR! 404 'awsk-sdk@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
this is the whole thing that i get
Trivikram Kamat

@/all Please upgrade to Node.js >=10.x by 2021-10-31

The support for Node.js <10.x in the AWS SDK for JavaScript (v2) is going to end on 2021-11-01