aws-lambda

How can I bypass the 10MB limit of AWS API gateway and POST large files to AWS lambda?

自古美人都是妖i 提交于 2020-01-22 00:43:34
问题 what I want An API which takes file and some parameters using POST and gives back a JSON response. curl -X POST www.endpoint.com \ -F file=@/myfile.txt \ -F foo=bar # other params I have this working with Lambda + API gateway using binary data but 10MB limit is the issue. I have considered a POST API which uploads file to S3. The event generated is then read by Lambda. But for this I have few questions- Where will my other parameters go? How will Lambda return back the response? 回答1: Your use

How can I bypass the 10MB limit of AWS API gateway and POST large files to AWS lambda?

只谈情不闲聊 提交于 2020-01-22 00:42:30
问题 what I want An API which takes file and some parameters using POST and gives back a JSON response. curl -X POST www.endpoint.com \ -F file=@/myfile.txt \ -F foo=bar # other params I have this working with Lambda + API gateway using binary data but 10MB limit is the issue. I have considered a POST API which uploads file to S3. The event generated is then read by Lambda. But for this I have few questions- Where will my other parameters go? How will Lambda return back the response? 回答1: Your use

Lambda cold start possible solution?

偶尔善良 提交于 2020-01-21 04:05:33
问题 Is scheduling a lambda function to get called every 20 mins with CloudWatch the best way to get rid of lambda cold start times? (not completely get rid of)... Will this get pricey or is there something I am missing because I have it set up right now and I think it is working. Before my cold start time would be like 10 seconds and every subsequent call would complete in like 80 ms. Now every call no matter how frequent is around 80 ms. Is this a good method until say your userbase grows, then

AWS Lambda not importing LXML

别来无恙 提交于 2020-01-21 03:11:35
问题 I am trying to use the LXML module within AWS Lambda and having no luck. I downloaded LXML using the following command: pip install lxml -t folder To download it to my lambda function deployment package. I zipped the contents of my lambda function up as I have done with all other lambda functions, and uploaded it to AWS Lambda. However no matter what I try I get this error when I run the function: Unable to import module 'handler': /var/task/lxml/etree.so: undefined symbol: PyFPE_jbuf When I

AWS Lambda “Process exited before completing request”

纵饮孤独 提交于 2020-01-19 03:08:06
问题 I am trying to call a DynamoDB client method and get one item from the DynamoDB table. I am using AWS Lambda . However, I keep getting the message: "Process exited before completing request." I have increased the timeout just to make sure, but the processing time is less than the timeout. Any advice? console.log('Loading event'); var AWS = require('aws-sdk'); var dynamodb = new AWS.DynamoDB({apiVersion: '2012-08-10'}); exports.handler = function(event, context) { dynamodb.listTables(function

API Gateway 500 Response on Unhandled Exception

狂风中的少年 提交于 2020-01-17 07:29:49
问题 I have a method on an API gateway which integrates with a Python Lambda function. I would like my API Gateway to return a 500 response if an exception is raised in my Python Lambda function where the errorMessage field doesn't match one of the regex's in the Integration Response's for the method. I would only like to return a 200 if an exception is not raised and the lambda returns without failure. With the setup in the picture above - any exception raised which does not match (.|\n)*'type':

AWS Lambda for transformation of messages

感情迁移 提交于 2020-01-17 07:06:53
问题 My architecture is something like as: SNS -> AWS Lambda -> Dynamo Db SNS is publishing messages to which AWS Lambda function is the subscriber and then AWS Lambda pushes the data into Dynamo Db. Is AWS Lambda good for doing transformations? Eg. I wanted to transform the message received by AWS Lambda to some other form and then pass it to downstream systems. By 'good', I mean is it normally done in AWS Lambda or for transformation, or I should use SQS Consumer probably for that? 来源: https:/

botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint

我怕爱的太早我们不能终老 提交于 2020-01-17 05:20:12
问题 I'm running Ubuntu 12.04, Python 2.7.3 and trying to run chalice However, when I run chalice deploy I get back: botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "https://lambda.us-east-1.amazonaws.com/2015-03-31/functions/helloworld" I can't find any information on what's causing this. My AWS configuration was setup and tested to be working with boto. My config: [default] output = table region = us-west-1 回答1: As per your config you have setup the region to

AWS Lambda calling SNS

南楼画角 提交于 2020-01-16 20:01:53
问题 I'm playing with my Amazon Echo and wrote a little function which I hope would text me after a response from my daughter. The code executes fine - but the sns.publish never happens. It fails silently - I can't raise an error. I believe I have the proper IAM permissions and Topic subscriptions. Can someone help? function textMom(kindOfDay){ var message = "Test"; var sns = new AWS.SNS(); console.log("textMethod") sns.publish({ TopicArn: "arn:aws:sns:us-east-1:", Message: message }, function(err

AWS Lambda calling SNS

最后都变了- 提交于 2020-01-16 20:00:31
问题 I'm playing with my Amazon Echo and wrote a little function which I hope would text me after a response from my daughter. The code executes fine - but the sns.publish never happens. It fails silently - I can't raise an error. I believe I have the proper IAM permissions and Topic subscriptions. Can someone help? function textMom(kindOfDay){ var message = "Test"; var sns = new AWS.SNS(); console.log("textMethod") sns.publish({ TopicArn: "arn:aws:sns:us-east-1:", Message: message }, function(err