aws-lambda

Timeout behaviour when AWS Lambda with limited concurrency is consuming from an AWS SQS queue

谁说胖子不能爱 提交于 2020-04-17 21:46:15
问题 I have a AWS Lambda with limited concurrency set that is consuming messages from a AWS SQS of type FIFO, and I just learned that the "messages in flight"-property of the queue does not reflect the number of concurrent lambdas processing the messages. However, do I need to worry that the Default Visibility Timeout of the queue will time out before a lambda or in the middle of a lambda just having received a message? Or rather is the Default Visibility Timeout counted from when the message was

Timeout behaviour when AWS Lambda with limited concurrency is consuming from an AWS SQS queue

独自空忆成欢 提交于 2020-04-17 21:45:19
问题 I have a AWS Lambda with limited concurrency set that is consuming messages from a AWS SQS of type FIFO, and I just learned that the "messages in flight"-property of the queue does not reflect the number of concurrent lambdas processing the messages. However, do I need to worry that the Default Visibility Timeout of the queue will time out before a lambda or in the middle of a lambda just having received a message? Or rather is the Default Visibility Timeout counted from when the message was

How to debug mesa driver problem with Xvfb, headless-gl when packaging for AWS Lambda

左心房为你撑大大i 提交于 2020-04-17 21:44:34
问题 I am stuck at debugging the packaging of a custom Xvfb built with headless-gl (ThreeJS and WebGL) for AWS Lambda. Potentially I am missing some intricacies of installing drivers or just a required library and I cannot get useful logs. I am trying to run node with ThreeJS/WebGL in a headless environment. The purpose of this is to package it all into an AWS Lambda function. Currently, I am testing in Docker with a clean lambci/lambda:build-nodejs12.x image (which should resemble amazon linux 2)

How to debug mesa driver problem with Xvfb, headless-gl when packaging for AWS Lambda

生来就可爱ヽ(ⅴ<●) 提交于 2020-04-17 21:40:21
问题 I am stuck at debugging the packaging of a custom Xvfb built with headless-gl (ThreeJS and WebGL) for AWS Lambda. Potentially I am missing some intricacies of installing drivers or just a required library and I cannot get useful logs. I am trying to run node with ThreeJS/WebGL in a headless environment. The purpose of this is to package it all into an AWS Lambda function. Currently, I am testing in Docker with a clean lambci/lambda:build-nodejs12.x image (which should resemble amazon linux 2)

Access Denied while querying S3 files from AWS Athena within Lambda in different account

戏子无情 提交于 2020-04-16 21:16:22
问题 I am trying to query Athena View from my Lambda code. Created Athena table for S3 files which are in different account. Athena Query editor is giving me below error: Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; I tried accessing Athena View from my Lambda code. Created Lambda Execution Role and allowed this role in Bucket Policy of another account S3 bucket as well like below: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS"

Access Denied while querying S3 files from AWS Athena within Lambda in different account

馋奶兔 提交于 2020-04-16 21:12:07
问题 I am trying to query Athena View from my Lambda code. Created Athena table for S3 files which are in different account. Athena Query editor is giving me below error: Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; I tried accessing Athena View from my Lambda code. Created Lambda Execution Role and allowed this role in Bucket Policy of another account S3 bucket as well like below: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS"

Difference between SAM template and Cloudformation template

依然范特西╮ 提交于 2020-04-10 07:05:29
问题 I'm finding it hard to understand the difference between SAM template and Cloudformation template. I know that SAM template can be used to define Serverless Applications like Lambda, but how does that make it different from Cloudformation template? Is the syntax different? I can still specify the Lambda definitions in cloudformation template. So, my question is why should I care about SAM? Won't knowing about just cloud formation template be sufficient? 回答1: From CloudFormation's perspective,

Running selenium webdriver in amazon lambda python

匆匆过客 提交于 2020-04-09 17:53:43
问题 I want to run BeautifulSoup and selenium webdriver in amazon lambda and my running environment is python 3.6. Is it possible to run ? if so How. My intention is to scrap datas from a webpage using beautiful soup 4 and selenium(Since it has to scrap data dynamically generated by javascript). 回答1: Yes, it's possible. You need to package a headless Chrome binary and chromedriver along with all the Python packages you need. You'll also need to set several options in Selenium's Chrome web driver

Calling a lambda function once, it's executed twice

北慕城南 提交于 2020-04-07 06:48:06
问题 This is more of a concern than a question, but still, has anyone experienced this before? Does anyone know how to prevent it? I have a lambda function (L1) which calls a second lambda function (L2) all written in NodeJs (runtime: Node.Js 8.10, and aws-sdk should be v2.488.0 - but I'm just pasting that from the documentation). The short story is that L1 is supposed to call L2, and when it does L2 is executed twice! I discovered this by writing logs to CloudWatch and I could see one L1 log and

AWS Lambda Account Concurrency, Throttling

若如初见. 提交于 2020-03-26 06:40:52
问题 I am considering NOT using API gateway for performance reasons. Instead, I want to expose a lambda function directly to the web. Unauthenticated IAM credentials are required, and provided by the AWS JavaScript SDK. I realize this could be a concern if a bad actor tries to invoke my function at an astronomical pace and cause major billing issues. I don't think this is likely as someone would specifically have to target my application, request IAM credentials and then invoke the request... a