Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • 06:58
    Vrq commented #3983
  • 06:13
    dharmveer18 commented #3591
  • Jun 29 20:41
    rchl closed #4038
  • Jun 29 20:41
    rchl commented #4038
  • Jun 29 19:13

    AllanZhengYP on master

    Sqs AwsJson migration (#4105) … (compare)

  • Jun 29 19:13
    AllanZhengYP closed #4105
  • Jun 29 18:23

    aws-sdk-js-automation on v2.1165.0


  • Jun 29 18:23

    aws-sdk-js-automation on master

    Updates SDK to v2.1165.0 (compare)

  • Jun 29 17:18

    AllanZhengYP on master

    fix large file, mulitipart uplo… (compare)

  • Jun 29 17:18
    AllanZhengYP closed #4141
  • Jun 29 17:17
    AllanZhengYP closed #4008
  • Jun 29 17:17
    AllanZhengYP commented #4008
  • Jun 29 17:16
    AllanZhengYP commented #3163
  • Jun 29 17:16
    AllanZhengYP closed #3163
  • Jun 29 17:15
    AllanZhengYP review_requested #4141
  • Jun 29 17:15
    AllanZhengYP opened #4141
  • Jun 29 16:59
    AllanZhengYP commented #4008
  • Jun 29 16:58
    AllanZhengYP commented #4008
  • Jun 29 13:32
    james64 edited #4140
  • Jun 29 13:30
    james64 labeled #4140
@willrust :thumbsup:
Mark Avery
just more digging.. searched for the string that was in the logs..
Hi @ankitch89 I am running into the same issue, did you find a fix? I am fairly new to aws, do you have any typescript code samples to make requests from lambda to elastic search?
hey, I'm quite new in the JS side of AWS. Does anybody know if there is a plan to release modular SDK?
hello. can anyone help with exposing a port for an ec2 instance?
@zebralight You need to add a security group on EC2 instance and mention the port which you want to expose in inbound rules. In case you want to connect to your application Just make sure the port should be same as on which you are running the web application. If you face any problem do let me know, I will help you out.
Anish Shah
I'm getting an ExpiredToken exception while trying to upload object to S3 - using sdk v2
any ideas how to resolve this
Hi im trying to mock AWS services using, aws-sdk-mock. I ge the error: Missing region in config. It has something to do with the initialise of the client. I can not figure out whats wrong.
Ronique Ricketts
I am currently working on an app and I am getting this error Cannot find module '/codebuild/output/src599470665/src/KAMS/node_modules/gulp/bin/gulp.js when I try to build the app in aws amplify

I can't seem to get EventBridge rules to work.

I created a hello world lambda that just logs the event.
When testing the event, the CloudWatch logs display the logged event.

When I try to putEvents(), I get a success response with the event id.

So, the only thing that I can think of that should be broken is my rule

The "Event Pattern" is just { "account" : [myAccount] }
The event bus is the event bus I am using for putEvents()
And the target is the lambda I just created
But nothing is logged
Status says "Enabled"
I'm using this to test,
        Entries : [
                Source : "some.source",
                DetailType : "EventBridgeTest",
                Detail : JSON.stringify({ hello : "world" }),
                EventBusName : "some-event-bus",
                Time : new Date(),
Hi guys, I am trying to upload a file to S3 using s3.createPresignedPost... this is so incredibly frustrating. Been on it for hours and hours and can't get past <Code>AccessDenied</Code> <Message>No AWSAccessKey was presented.</Message>
I've tried everything I could find on the internet, setting up CORS settings for the Bucket, adding headers, removing headers... just totally lost here.
This message is so generic (you get it if you try to POST to an unexisting bucket, for example) that I don't even know where to begin. I've been a programmer for 15 years now. I would be able to figure this out if I could find a working example or something. The AWS developer experience is just so bad.
Justin Taylor
@pimftw did you get sorted with this?
"Missing region in config"
Yair Ivan Medina Cota
Franz Bu

I am new with AWS javascript sdk and we are trying to interact with AWS IoT over websockets since normal MQTT connection to AWS IoT with TLS (with certificates) is not supported for browsers.
I have been following this guide and also this guide but i cannot understand where the credentials and sessionToken is comming from. I know where to find my credentials (access key ID and secret access key) on my AWS account but when i try to run the examples mentioned in both links i become always an error because i dont know how to get my credentials and session token. It seems like i have to use AWS cognito?? but it should be an other way without this other service or not? Has someone maybe a more complete example? Please be kind and help me :D

In the code bellow i think somewhere i should do something like this:

var con = AWS.Credentials({accessKey: 'KEY',secretAccessKey: 'SECRET_KEY'})

or like this:

var con = AWS.Config.Credentials({accessKey: 'KEY',secretAccessKey: 'SECRET_KEY'})

Because i always become an error here:


But how i have to do it exactly?? I havent been able to find a good and complete example...

The imports/sources i am using:

<script src="https://sdk.amazonaws.com/js/aws-sdk-2.653.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/components/core-min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/components/hmac-min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/components/sha256-min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/paho-mqtt/1.0.1/mqttws31.min.js" type="text/javascript"></script>
Gus Narea
Hello. I have a Node.js web app that communicates with S3. Is it safe to reuse the same AWS.S3 object across (concurrent) requests? I'd like to initialise the S3 client with keep-alive at the module level, assuming it's safe to use the same object concurrently.
Hi, hope this is the right channel. I'm trying to figure out a way to query n random items from dynamoDB without scanning the entire thing? Could anyone point me in the right direction?
Hey guys, did you manage to do a put request with Amplify and Angular 9, Having a 403...
Ivan Perevernykhata
hey guys, I may be missing something obvious but when I install @aws-amplify which gets @aws-sdk as a dependency, I', getting alot of You may need an appropriate loader to handle this file type. which complains about async/await. I see that sdk has both cjs and precompiled es exports, but somehow react-create-app picks csj version SyntaxError: Unexpected token (13:20) @ ./~/@aws-sdk/credential-provider-cognito-identity/dist/cjs/index.js 4:21-53
Hello, I am trying to create an interface for Amazon Connect (Contact Center) for the browser. Connect uses it's own user database, and I am trying to allow users to authenticate against this database, instead of something like Cognito. I don't want to embed a app key/secret key. Can anyone point me in the right direction? I am trying to pull info about queues and metrics to add to the agents CCP interface.
Ronique Ricketts
How can I query an Appsync API from lamda function
Thomas Krause

Hey guys, I just released a small npm library that allows you to transform a CIDR and a list of denied sub-CIDRs into a list of allowed CIDRs:


Might come in handy for anyone who is dealing with SecurityGroups and their traffic configuration. My personal use-case is denying a set of sub-CIDRs that contain internet gateways while the rest of the larger "main" CIDR needs to be allowed. I'm using this in combination with CDK but I'm sure it might also be useful for some SDK users.

Nenad Kostic

I am using node 6 and in the loop I am sending the files to s3 using aws-sdk and I get this error : buffer.js:25
const ui8 = new Uint8Array(size);

RangeError: Invalid array buffer length
at new ArrayBuffer (native)
at new Uint8Array (native)
at createBuffer (buffer.js:25:17)
at allocate (buffer.js:158:12)
at new Buffer (buffer.js:56:12)
at allocNewPool (fs.js:1602:10)
at ReadStream._read (fs.js:1701:5)
at ReadStream.Readable.read (_stream_readable.js:336:10)
at ManagedUpload.fillStream (/opt/ocu/node/node_modules/aws-sdk/lib/s3/managed_upload.js:422:25)
at ReadStream.<anonymous> (/opt/ocu/node/node_modules/aws-sdk/lib/s3/managed_upload.js:188:4425)

when the list of this file (array) is smaller all works well but we ran into problems when the list have more than 1000 elements.
Any ideas someone ?
At first I used ^2.541.0 now I tried ^2.671.0 same outcome.
Hi, what is the best room to ask about AWS Kinesis?
Artūras Sotničenko
Hi whats the best way to create aws cloud front signed URL with custom policy for resources? I need to get signed URL for .m3u8 and resources that are related to it (namespaced) in s3 bucket so web player can access it. Is there any guidelines?
Artūras Sotničenko
Currently, I can do a signed URL using
AWS.CloudFront.Signer(cloudfrontAccessKeyId, cloudFrontPrivateKey).getSignedUrl({expires , url});
but when I add Base64 encoded policy as a parameter that permits access to the namespace, the cloud front will return 403
Screenshot from 2020-05-12 16-34-36 (2).png Hello, is there a standard way to troubleshoot "builds from the SDK builder"? I have not been able to run the downloaded .js file. I actually want to run this in Node on Lambda, but I also tested it in the browser, and the screencap is from the browser error.
This message was deleted
Darwayne Jay Alfaro
Hello everyone, is it possible to use sdk to create and deploy eks cluster? Does anyone has some documentations, besides the aws docs, and tutorials? thanks.
Hello everyone! Is there a chance anyone can help me with this? https://stackoverflow.com/questions/61878155/retrieve-aws-app-config-configuration-from-reactjs-app
Níko Escobar

Hi guys, how you guys are doing? I hope everything is fine =)

I'm starting to work with aws-sdk-js, but I think I have some limitation in my knowledge of typescript,

I was trying to get the response data from the support.describeTrustedAdvisorChecks in such a way

const response = await support.describeTrustedAdvisorChecks({language: 'en'})

and it wasn't working, so I decided to take a look on the typescript implementation

describeTrustedAdvisorChecks(callback?: (err: AWSError, data: Support.Types.DescribeTrustedAdvisorChecksResponse) => void): Request<Support.Types.DescribeTrustedAdvisorChecksResponse, AWSError>;

I'm really not sure but I think that I won't be able to get the data out of the describeTrustedAdvisorChecks method, unless I pass a callback and work with that data inside of it, is that right?

So using async await won't help me in that case right? =(

I was trying to avoid indentation, and async await help me really good to prevent it, is there any way of getting the describeTrustedAdvisorChecks data in such a way? =)

Hi Guys, understand this question may have been answered - looking for some idea. I have a lambda update function which just updates a row in a table. I am keeping the primary key -id as event.id and using the PUT method . When I test the function through Lambda, it works fine and updates the DynamoDB table. When I test from AWS API gateway, it gives error of attribute not initialised " "errorType": "ValidationException",
"errorMessage": "Supplied AttributeValue is empty, must contain exactly one of the supported datatypes". I am passing the id as path variable. and the logs look like the function is taking the path and the body attributes. as below Mon Jun 01 07:31:41 UTC 2020 : Method request path: {id=4aaf78ea-4d7a-49d5-b2bb-0c7ad1137495}
Mon Jun 01 07:31:41 UTC 2020 : Method request query string: {}
Mon Jun 01 07:31:41 UTC 2020 : Method request headers: {}
Mon Jun 01 07:31:41 UTC 2020 : Method request body before transformations: {
} My Lambda function is as follows: const AWS = require("aws-sdk");

const dynamodb = new AWS.DynamoDB({
region: "ap-southeast-2",
apiVersion: "2012-08-10"

exports.handler = (event, context, callback) => {

const params = {
Item: {

   id: {
  S: event.id

  cover: {
    S: event.cover
  productType: {
    S: event.productType

  state: {
    S: event.state
  value: {
    S: event.value
TableName: "testtable"

dynamodb.putItem(params, (err, data) => {
if (err) {
} else {
callback(null, {
id: params.Item.id.S,
cover: params.Item.cover.S,
productType: params.Item.productType.S,
state: params.Item.state.S,
value: params.Item.value.S

hi - if you are using ApiGateway, you may want to check where the data is coming from. if your id is a path parameter, you'll find it in event.pathParameters.id. then what you are trying to provide as state, value, cover... are probably stored in the body of your request, event.body. Be aware that it is a stringified value so you will need JSON.parse(event.body).productType to get the productType for instance

Thanks, I changed the code of the handler function as below but I am still getting error as id is undefined.
exports.handler = (event, context, callback) => {
const id = event.pathParameters.id;
const reqBody = JSON.parse(event.body);
const { cover,productType,state,value} = reqBody;

const params = {
Key: {
id: id
TableName: "baserate",
ConditionExpression: 'attribute_exists(id)',
UpdateExpression: 'SET cover = :cover, productType = :productType,state = :state,value = :value',
ExpressionAttributeValues: {
':cover': cover,
':productType': productType,
':state': state,
':value': value
ReturnValues: 'ALL_NEW'
"errorType": "TypeError",
"errorMessage": "Cannot read property 'id' of undefined",
"trace": [
"TypeError: Cannot read property 'id' of undefined",
" at Runtime.exports.handler (/var/task/index.js:17:35)",
" at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)"

which line is line 17 ?