aws-lambda

Unable to use pyodbc with aws lambda and API Gateway

五迷三道 提交于 2019-12-24 04:21:22
问题 I am trying to build a AWS Lambda function using APi Gateway which utlizes pyodbc python package. I have followed the steps as mentioned in the documentation. I keep getting the following error Unable to import module 'app': libodbc.so.2: cannot open shared object file: No such file or directory when I test run the Lambda function. Any help appreciated. I am getting the same error when I deployed my package using Chalice. It seems it could be that I need to install unixodbc-dev. Any idea how

Get Value Back from AWS lambda.invoke synchronously

时间秒杀一切 提交于 2019-12-24 04:01:59
问题 I'm attempting to call an AWS Lambda function from another Lambda function using the invoke method with a RequestResponse invocation type and retrieve a value returned from the Lambda. When I call the lambda.invoke using await the callback still appears to be called asynchronously. I'd like for the values I need to be available on the next line of code, hence the synchronous requirement. However, in the code below in the logs I see the "Data out of Callback" entry occur prior to the "Data in

Get Value Back from AWS lambda.invoke synchronously

会有一股神秘感。 提交于 2019-12-24 04:01:06
问题 I'm attempting to call an AWS Lambda function from another Lambda function using the invoke method with a RequestResponse invocation type and retrieve a value returned from the Lambda. When I call the lambda.invoke using await the callback still appears to be called asynchronously. I'd like for the values I need to be available on the next line of code, hence the synchronous requirement. However, in the code below in the logs I see the "Data out of Callback" entry occur prior to the "Data in

AWS Lambda ENI limitation in VPC clarification

风格不统一 提交于 2019-12-24 03:35:09
问题 I found this in the AWS official docs for lambda: If your Lambda function accesses a VPC, you must make sure that your VPC has sufficient ENI capacity to support the scale requirements of your Lambda function. You can use the following formula to approximately determine the ENI requirements. Projected peak concurrent executions * (Memory in GB / 3GB) I understand the reason behind this formula. My only question is: why 3GB? From where this number comes from? 回答1: The formula Projected peak

Bash script failing with unknown option due to space in argument

混江龙づ霸主 提交于 2019-12-24 03:29:06
问题 I am trying to run aws create lambda function. It goes as follows - eval $(aws lambda create-function \ --function-name $FUNCTION_NAME \ --runtime $RUNTIME \ --role $ROLE \ --handler $HANDLER \ --region $REGION \ --zip-file $ZIP_FILE \ --profile $PROFILE \ --environment $env_variables) All the variables come from command line. It is failing for env_variables. This gets constructed as - env_variables="Variables={INPUT=${DAYS}}" where DAYS is actually "20 days" How can I avoid this space and

.Net Core (2.1)- Lambda function does work while in 2.2 it doesn't?

≯℡__Kan透↙ 提交于 2019-12-24 03:06:41
问题 I've created a simple empty AWS Lambda function using .Net Core 2.1 : Here is the folder structure : (here is the csproj) And a FunctionHandler which gets DI and invoke some dummy method : Now let's run the "Mock Lambda Test Tool" , we can see that it works : So where is the problem? I've read here that 2.2 is supported : This means you can now author Lambda functions using .NET Core 2.2 and .NET Core 3.0 preview. Amazon.Lambda.RuntimeSupport is available as source code on GitHub, or as a

Is it possible to connect API gateway with node routes in AWS lambda?

谁说胖子不能爱 提交于 2019-12-24 01:58:06
问题 I have implemented node application with AWSServerlessExpress and deployed in Lambda function. but unable to point API Gateway to node routes. every time I'm getting 404 status. var express = require('express') , router = express.Router() router.post('/es', function(request, response){ response.status(200).send("Lambda is triggered"); response.end() }) router.get('/es/csv', function(request, response){ response.status(200).send("hello"); response.end() }) module.exports = router; How can I

CORS defeats AWS LAMBDA :(

倾然丶 夕夏残阳落幕 提交于 2019-12-24 01:14:08
问题 I've been reading a lot on CORS/Lambda/AWS API Gateway configuration, including AWS's setup help: http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-cors.html And this great article: https://serverless.com/framework/docs/providers/aws/events/apigateway/ However, CORS is still defeating my API Gateway / Lambda function and I can't figure it out. Would love some help. The meat of it seems to be that API Gateway proxies the request onto Lambda and you need to set "Access-Control

How to add slot values dynamically to alexa skill

旧城冷巷雨未停 提交于 2019-12-24 00:54:49
问题 I am new in Alexa development. I have successfully create an Alexa skill with AWS lambda function and Node.js code. This is my intent schema. { "intents": [ { "slots": [ { "name": "locationName", "type": "LOCATION_LIST" } ], "intent": "locationIntent" } ] } Also I have used custom slot type "LOCATION_LIST" with following values. kitchen bedroom bathroom dining area It's working fine. But I need to add more location values dynamically from my own service. Is it possible? Based on my system

Amazon Lex Bot - Replying to Hello

≡放荡痞女 提交于 2019-12-24 00:26:36
问题 I have started learning Amazon lex, gone through their Documentation and Example Bots. Problem i am facing is that all the bots are Q&A types, if i have to make the bot reply to Hello, what should be the correct way or how to do it? According to my understanding : I am thinking of creating an intent for Hello and when it gets fulfilled i can make the bot reply How can i help you? with Lambda Function, this is the way it is supposed to be done? There can be many other direct question that user