aws-lambda

SQS Timeout from Lambda within VPC

会有一股神秘感。 提交于 2021-01-27 12:52:34
问题 I have a Lambda that needs to be on a VPC to talk to protected resources like RDS and AWSDocumentDB. It also needs to be able to see the outside world for some calls to 3rd party APIs. To do this I used the VPC wizard to create a VPC that had both public and private subnets. The wizard also created and attached an Internet Gateway. After this I attached my Lambda, RDS instance and DocumentDb cluster to the VPC. Since then, however I have been unable to talk to my SQS queues from within my

AWS Lex + Lambda - Intercepting all of next user response regardless of context - without defining sample utterances?

蓝咒 提交于 2021-01-27 12:04:00
问题 Consider the following scenario (U=User, L=Lex): U1: Hello L1: Hello, please give me your name to get started. U2: Bob L2: Bob, consider the following question: What colour is the sky? U3: The sky is usually blue but sometimes the sky is red. The system reads a database of questions and randomly chooses one to present to the user. This is done via AWS Lambda and the question is presented to the user in message L2. Is there any way to say that 'the next response from the user should be treated

AWS Lex + Lambda - Intercepting all of next user response regardless of context - without defining sample utterances?

别等时光非礼了梦想. 提交于 2021-01-27 11:52:28
问题 Consider the following scenario (U=User, L=Lex): U1: Hello L1: Hello, please give me your name to get started. U2: Bob L2: Bob, consider the following question: What colour is the sky? U3: The sky is usually blue but sometimes the sky is red. The system reads a database of questions and randomly chooses one to present to the user. This is done via AWS Lambda and the question is presented to the user in message L2. Is there any way to say that 'the next response from the user should be treated

Lambda Not Loading Cryptography Shared Library

坚强是说给别人听的谎言 提交于 2021-01-27 11:41:41
问题 I'm using the cryptography library in AWS Lambda. I've compiled the package using pip in an Amazon Linux VM. I have uploaded the package as a layer. Either way, every time I call the library, I have an error which is not descriptive at all: Unable to import module 'lambda_function': libffi-ae16d830.so.6.0.4: cannot open shared object file: No such file or directory As you can see, the error is not about not finding the lib, is another shared module which I haven't been able to find. Here's an

Why isn't SQS an event source for lambda?

与世无争的帅哥 提交于 2021-01-27 10:48:32
问题 AWS Lambda functions have a bunch of event sources but SQS ain't one. Why is that? I would have thought it was a good fit. 回答1: On 28 JUN 2018 AWS Lambda Adds Amazon Simple Queue Service to Supported Event Sources. 回答2: To some extent; yes I do agree with your view point. But If you really think of difference between SQS and SNS is that (as John rightly pointed out) SQS is supposed to make things asynchronus... It is like a queue which can be consumed when needed. Queue to be consumed

Python - creating aws lambda deployment package

五迷三道 提交于 2021-01-27 10:42:04
问题 I want to script updating code for my AWS Lambda using a Fabric task. Boto3 api expects a byte array of base-64 encoded zip file. What would be the simplest way to create it assuming I have the source code files as the input? 回答1: With the current boto3, don't unzip it, don't base64 encode it. You can do it with an open and a read like this: import boto3 c = boto3.client('lambda') c.create_function({ 'FunctionName': 'your_function', 'Handler': 'your_handler', 'Runtime': 'python3.6', 'Code': {

What is the simplest way to process WebSockets messages on AWS?

北战南征 提交于 2021-01-27 10:40:21
问题 What is a good way to deploy a WebSockets client on AWS? I'm building an app on AWS which needs to subscribe to several WebSockets and several REST sources and process incoming messages (WebSockets) or make periodic requests (REST). I'm trying to go server-less and maximize use of AWS platform services, to eliminate the need to manage VMs, OS patches, etc. (and hopefully reduce cost). My idea so far is to trigger a Lambda function every time a message arrives. The function can then transform

AWS Lambda Triggered by SQS increases SQS request count

陌路散爱 提交于 2021-01-27 10:24:25
问题 I have a AWS Lambda function which is triggered by SQS. This function is triggered approximately 100 times daily, but request count to the SQS queue is approximately 20.000 times daily. I don't understand why the number of requests made to the SQS is too high. My expectation is that the number of requests made to the SQS should be same with the Lambda invocation. I have only one Lambda function and one SQS queue in my account. Can be related with polling of SQS queue? I tried to change the

AWS Lambda Triggered by SQS increases SQS request count

不问归期 提交于 2021-01-27 10:23:17
问题 I have a AWS Lambda function which is triggered by SQS. This function is triggered approximately 100 times daily, but request count to the SQS queue is approximately 20.000 times daily. I don't understand why the number of requests made to the SQS is too high. My expectation is that the number of requests made to the SQS should be same with the Lambda invocation. I have only one Lambda function and one SQS queue in my account. Can be related with polling of SQS queue? I tried to change the

Async Lambda Function: Returning promise or sending responseURL does not terminate CloudFormation custom resource invocation

 ̄綄美尐妖づ 提交于 2021-01-27 07:15:19
问题 I have a lambda function invoked as a custom resource via a CloudFormation template. It Creates/Deletes AWS Connect instances. The API calls work fine but I cannot seem to terminate the custom resource invocation, so the last CF block remains CREATE_IN_PROGRESS. No matter what I return from the async function it just won't terminate the CF execution with a success. I'm able to use a non-async handler successfully as in https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/walkthrough