aws-lambda

In near real time analytics, why is Lambda-->Firehose-->S3 preferred over Lambda -->S3?

。_饼干妹妹 提交于 2021-01-04 06:38:01
问题 Many AWS reference architectures for serverless real-time analytics, suggest pushing processed data from Lambda to S3 through Kinesis Firehose. e.g. https://aws.amazon.com/blogs/big-data/create-real-time-clickstream-sessions-and-run-analytics-with-amazon-kinesis-data-analytics-aws-glue-and-amazon-athena/ Why can’t we push data from Lambda to S3 directly? Isn't it better to avoid complexity and additional cost by skipping the mediator Kinesis Firehose component? Is there any problem with

aws apigateway lambda always return 502

╄→尐↘猪︶ㄣ 提交于 2021-01-03 05:42:46
问题 I have created aws apigateway lambda integration for my proxy server. When i am making get request to the gateway, the request is successfully going through. The lambda function also executes successfully and writes response in outputstream with statusCode as 200. But apigateway always returns 502. Snippet of handleRequest(): BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); JSONObject event = (JSONObject) parser.parse(reader); request = Input.builder().setEvent

aws apigateway lambda always return 502

断了今生、忘了曾经 提交于 2021-01-03 05:38:43
问题 I have created aws apigateway lambda integration for my proxy server. When i am making get request to the gateway, the request is successfully going through. The lambda function also executes successfully and writes response in outputstream with statusCode as 200. But apigateway always returns 502. Snippet of handleRequest(): BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); JSONObject event = (JSONObject) parser.parse(reader); request = Input.builder().setEvent

aws apigateway lambda always return 502

青春壹個敷衍的年華 提交于 2021-01-03 05:35:56
问题 I have created aws apigateway lambda integration for my proxy server. When i am making get request to the gateway, the request is successfully going through. The lambda function also executes successfully and writes response in outputstream with statusCode as 200. But apigateway always returns 502. Snippet of handleRequest(): BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); JSONObject event = (JSONObject) parser.parse(reader); request = Input.builder().setEvent

How to avoid AWS SAM rebuild and reupload a gradle function with unchanged code?

ぐ巨炮叔叔 提交于 2021-01-02 20:30:09
问题 I'm developing an application with micronaut using SAM CLI to deploy it on AWS Lambda. As I was including dependencies and developing new features, the function packages got bigger an bigger (now they are around 250MB). This makes deployment take a while. On top of that every time I edit template.yaml and then run sam build && sam deploy to try a new configuration on S3, RDS, etc... I have to wait for gradle to build the function again (even though it's unchanged since the last deployment)

How to fix 503 error with resize image lambda edge functions on cloudfront?

假装没事ソ 提交于 2021-01-02 08:08:33
问题 I am trying resize images with a cloudfront distribution accoring to article : https://aws.amazon.com/tr/blogs/networking-and-content-delivery/resizing-images-with-amazon-cloudfront-lambdaedge-aws-cdn-blog/ I created project folder with given Origin-Response and Viewer-Request functions on article and I downloaded dependencies, deployed the zip package with cloudformation template. IAM Role, s3 bucket, bucket policy, distribution with lambda@edge functions were created without any error and

How to fix 503 error with resize image lambda edge functions on cloudfront?

喜欢而已 提交于 2021-01-02 08:08:17
问题 I am trying resize images with a cloudfront distribution accoring to article : https://aws.amazon.com/tr/blogs/networking-and-content-delivery/resizing-images-with-amazon-cloudfront-lambdaedge-aws-cdn-blog/ I created project folder with given Origin-Response and Viewer-Request functions on article and I downloaded dependencies, deployed the zip package with cloudformation template. IAM Role, s3 bucket, bucket policy, distribution with lambda@edge functions were created without any error and

AWS Lambda: async C# handler

隐身守侯 提交于 2021-01-02 06:45:35
问题 The AWS document states that Using Async in C# Functions with AWS Lambda If you know your Lambda function will require a long-running process, such as uploading large files to Amazon S3 or reading a large stream of records from DynamoDB, you can take advantage of the async/await pattern. By creating a handler with this signature, Lambda will execute the function synchronously and wait a maximum of 5 minutes for execution to complete before returning or timing out. I feel very confused Lambda

Occasional 'temporary failure in name resolution' while connecting to AWS Aurora cluster

梦想的初衷 提交于 2021-01-01 07:59:24
问题 I am running an Amazon Web Services RDS Aurora 5.6 database cluster. There are a couple of lambda's talking to these database instances, all written in python. Now everything was running well, but then suddenly, since a couple of days ago, the python code sometimes starts throwing the following error: [ERROR] InterfaceError: 2003: Can't connect to MySQL server on 'CLUSTER-DOMAIN:3306' (-3 Temporary failure in name resolution) This happens in 1 every 1000 or so new connections. What is

Occasional 'temporary failure in name resolution' while connecting to AWS Aurora cluster

拥有回忆 提交于 2021-01-01 07:55:46
问题 I am running an Amazon Web Services RDS Aurora 5.6 database cluster. There are a couple of lambda's talking to these database instances, all written in python. Now everything was running well, but then suddenly, since a couple of days ago, the python code sometimes starts throwing the following error: [ERROR] InterfaceError: 2003: Can't connect to MySQL server on 'CLUSTER-DOMAIN:3306' (-3 Temporary failure in name resolution) This happens in 1 every 1000 or so new connections. What is