aws-lambda

Could not load file or assembly 'AWSSDK.Core On .net core in AWS Lambda

安稳与你 提交于 2019-12-12 12:35:44
问题 Using this template, I've been trying to get a Lambda function running. When it goes to execute a module containing open Amazon open Amazon.S3 it blows up with a "errorType": "FileNotFoundException", "errorMessage": "Could not load file or assembly 'AWSSDK.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604'. The system cannot find the file specified.",` I've tried a nuget install of AWSSDK.Core to no avail. Errors in /Users/sanitized/aws_lambda/project.json Package AWSSDK

How to forbid replacing process.env variables during compilation in webpack?

狂风中的少年 提交于 2019-12-12 12:24:09
问题 Story I'm developing the AWS Lambda functions and compile the code using webpack . I've read some of the articles and it seems that the process.env variables are auto replaced during compilation. Although it's cool I want to forbid this behaviour. Why? Because I'm passing environment variables using AWS Lambda dashboard. Webpack configuration const nodeExternals = require('webpack-node-externals') const webpack = require('webpack') const path = require('path') module.exports = { target: 'node

dynamodb.transactWriteItems is not a function error on Lambda but not when using VS Code

南楼画角 提交于 2019-12-12 10:37:36
问题 I have successfully tested dynamodb.transactWriteItems using VS Code (node js) but when I moved my code to Lambda, it always throws the Type Error: dynamodb.transactWriteItems is not a function. Note that I am NOT using documentClient so declaring dynamodb = new AWS.DynamoDB() is not the solution. How can I check the AWS-SDK used by Lambda (my npm aws-sdk is v2.372.0) and how do I make use of the proper AWS-SDK version on Lambda if this is the root cause of the issue? data = await dynamodb

AWS Lambda function never calls the callback

寵の児 提交于 2019-12-12 10:37:18
问题 I've created a node lambda function that does a simple call to an Aurora database. When I test the function in the console, the query returns, I can see the results in the log, but the callback never seems to get called and so my lambda function times out. I can't figure out what the problem is. Hopefully someone here can point me to the problem. var mysql = require("mysql"); module.exports.handler = function(event, context, cb) { console.log('start\n'); var con = mysql.createConnection({ ...

Denying a Sign-up request in Cognito User Pools

百般思念 提交于 2019-12-12 10:36:08
问题 The description of a Cognito User Pools Pre Sign-up Lambda Trigger is: This trigger is invoked when a user submits their information to sign up, allowing you to perform custom validation to accept or deny the sign up request. I want to deny a sign-up request based on a certain condition in my Lambda. The trigger parameters (reproduced from the docs below) seem to only support auto-verification and auto-confirmation: { "request": { "userAttributes": { "string": "string", .... },

AWS Lambda Node.js Full-ICU

别说谁变了你拦得住时间么 提交于 2019-12-12 09:53:29
问题 I run node.js app localy with this command: $ node --icu-data-dir=node_modules/full-icu app.local.js How to specify icu-data-dir in AWS Lambda environment? Thanks 回答1: You should set the NODE_ICU_DATA environment variable so that it points to a directory where the correct ICU .dat file can be found. If you install the full-icu package using the node version that matches the one used by your lambdas, you should automatically get the correct .dat file. E.g. when using the runtime nodejs10.x :

Can amazon lex chatbot accept image as input ?

巧了我就是萌 提交于 2019-12-12 09:28:13
问题 I want to build a deep learning chatbot application which accepts image as input. I have built a lambda function integrating AWS rekognition that accepts image.Now, i want to extend this lambda function, and connect it to Amazon Lex bot , where user can upload the image for analysis. 回答1: AWS Lex Chatbot can't accept image but Its possible by Integrate your Amazon Lex Bot with Amazon API Gateway . Your application API call to the HTTPS endpoint hosted by AWS API Gateway. API Gateway deal With

AWS SNS publishing to a subscribed Lambda function logs null fields

心已入冬 提交于 2019-12-12 08:51:00
问题 Tried to post this to the AWS Forums, but it seems my account is "not yet ready", whatever that means. I've setup an AWS Lambda function (written in Java) that accepts a POJO in order to allow for automatic deserialization of JSON. The test JSON I am using is below and represents the JSON string that will be sent from the ultimate source of the message once everything is up and running. {"sender":"Joe", "id":1, "event":"started", "ticks":2, "time":"20150623T214256Z", "version":"1.0"} This

Trigger AWS lambda function after ECR event

荒凉一梦 提交于 2019-12-12 08:40:52
问题 I am trying to get an AWS Lambda function to run whenever a new image is pushed to an AWS container registry. I have created and tested the function which works fine. I have then created a simple CloudWatch event rule with the pattern: { "source": [ "aws.ecr" ] } which I believe will trigger on any event from ECR. The rule has a target of the lambda function. The problem is the function is not called when a new image is pushed to the registry (or deleted etc). Nothing appears in the

How can I create an AWS Lambda function using the AWS CLI?

余生颓废 提交于 2019-12-12 08:31:55
问题 I am trying to create an AWS Lambda function using the command aws lambda create-function \ --function-name foo\ --runtime nodejs\ --role lambda_basic_execution \ --handler asdf --zip-file "fileb:://boom.zip" I have a file called boom.zip available in the directory. But I cannot deploy using the above command. The failure message I get is --zip-file must be a file with the fileb:// prefix. Does anyone have a working example to create a lambda function using the AWS CLI? 回答1: You have an extra