aws-lambda

Lambda Timeout while communicating with S3

北战南征 提交于 2020-01-02 01:08:08
问题 I'm trying to simply list all the files in an S3 bucket using Lambda The code looks as follows: var AWS = require('aws-sdk'); var s3 = new AWS.S3(); exports.handler = (event, context, callback) => { s3.listObjectsV2({ Bucket: "bucketname", }, function(err, data) { console.log("DONE : " + err + " : " + data); callback(null, 'Hello from Lambda'); }); }; Using the above, I never get the "DONE" printed at all. The log doesn't show any information except for the fact that it timed out. Is there

How many records can be in S3 put() event lambda trigger?

我的梦境 提交于 2020-01-02 00:17:13
问题 I need to have some lambda function which got this flow: Triggered S3 put file event -> lambda function -> insert row to DynamoDB When I'm creating a test using AWS from the lambda screen, I got this example with only 1 record in the Records list: { "Records": [ // <<<----------------only 1 element { "eventVersion": "2.0", "eventTime": "1970-01-01T00:00:00.000Z", "requestParameters": { "sourceIPAddress": "127.0.0.1" }, "s3": { "configurationId": "testConfigRule", "object": { "eTag":

AWS Lambda S3 GET/POST - SignatureDoesNotMatch error

▼魔方 西西 提交于 2020-01-01 16:57:07
问题 I have had a Lambda node.js function up and running for about 6 months without any issue. The function simply takes a object and copies it from one bucket to another. Today, I have started getting: "SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your key and signing method." The code I am using is pretty simple, any suggestions on how I could fix this? var aws = require('aws-sdk'); var s3 = new aws.S3({apiVersion: '2006-03-01'});

How can I compile a node C++ addon so that I can use distribute it on amazon AWS?

半城伤御伤魂 提交于 2020-01-01 16:38:21
问题 AWS lambda does not support installing linux binaries on the system, you would have to include the executables on your system. this would be easy for executables such as ffmpeg that already supply static executables. How would this work for node binary addons that are compiled to using node-gyp ? Would simply including the build/ directory from a linux environment work? Has anyone figured this out yet? 回答1: In our case, it was node-dv module, which is built using node-gyp . The following

Opencv and AWS Lambda

百般思念 提交于 2020-01-01 14:27:23
问题 I am writing a lambda function in Java ad want to use the opencv library. I am having a hard time understanding how to set it up. Please help. I can set it up just fine locally but I am really confused about the lambda part. Edit: To be precise I am having trouble with System.LoadLibrary() function. The dll is in the project files but lambda cannot find it. 回答1: I recommend using Node.js instead of Java because Lambdas work better with Node.js. Your code will look like this: cv = require(

Lambda Return Payload botocore.response.StreamingBody object prints but then empty in variable

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-01 14:26:11
问题 I'm invoking a lambda function from another function and want to take a different action depending on the response, pretty standard stuff. However I get some unexpected behavior, it's probably something obvious, but it is eluding me. I've recreated my example in the simplest possible example any help would be much appreciated. The lambda function def lambda_handler(event, context): return 'Just a string' The code to call the lambda function def invoke_lambda(payload): r = lambda_client.invoke

Lambda Return Payload botocore.response.StreamingBody object prints but then empty in variable

只愿长相守 提交于 2020-01-01 14:25:08
问题 I'm invoking a lambda function from another function and want to take a different action depending on the response, pretty standard stuff. However I get some unexpected behavior, it's probably something obvious, but it is eluding me. I've recreated my example in the simplest possible example any help would be much appreciated. The lambda function def lambda_handler(event, context): return 'Just a string' The code to call the lambda function def invoke_lambda(payload): r = lambda_client.invoke

Opencv and AWS Lambda

自古美人都是妖i 提交于 2020-01-01 14:24:19
问题 I am writing a lambda function in Java ad want to use the opencv library. I am having a hard time understanding how to set it up. Please help. I can set it up just fine locally but I am really confused about the lambda part. Edit: To be precise I am having trouble with System.LoadLibrary() function. The dll is in the project files but lambda cannot find it. 回答1: I recommend using Node.js instead of Java because Lambdas work better with Node.js. Your code will look like this: cv = require(

AWS Lambda Performance issues

拜拜、爱过 提交于 2020-01-01 10:51:38
问题 I use aws api gateway integrated with aws lambda(java), but I'm seeing some serious problems in this approach. The concept of removing the server and having your app scaled out of the box is really nice but here are the problem I'm facing. My lambda is doing 2 simple things- validate the payload received from the client and then send it to a kinesis stream for further processing from another lambda(you will ask why I don't send directly to the stream and only use 1 lambda for all of the

AWS Lambda Performance issues

橙三吉。 提交于 2020-01-01 10:51:37
问题 I use aws api gateway integrated with aws lambda(java), but I'm seeing some serious problems in this approach. The concept of removing the server and having your app scaled out of the box is really nice but here are the problem I'm facing. My lambda is doing 2 simple things- validate the payload received from the client and then send it to a kinesis stream for further processing from another lambda(you will ask why I don't send directly to the stream and only use 1 lambda for all of the