Questions tagged [amazon-lambda]

This tag is for questions about Amazon Web Services' "Lambda".

AWS Lambda lets you run code on the Amazon cloud without provisioning or managing servers. Lambda takes care of everything required to run and scale your uploaded code with high availability. You can set up your code to automatically trigger from other AWS services or call it directly from any web or mobile app, and pay only for the compute time used.

154 questions
2
votes
2 answers

403 when using Terraform to attach Lambda Function to Target Group w/ ALB

I'm able to create Instances, Target Groups, and ALBs just fine with Terraform, but am getting stuck when trying to use Lambda Functions. It looks like the Lambda function gets created OK along with an ALB and a Target Group, but fails on the step…
John Heyer
  • 211
  • 1
  • 3
  • 10
2
votes
1 answer

AWS CloudFormation - Creating Layer Version and Function that uses layer

I have a Cloudformation template that currently looks roughly like the following. Resources: MyLayer: Type: AWS::Lambda::LayerVersion Properties: CompatibleRuntimes: - nodejs12.x - nodejs10.x Content:…
2
votes
1 answer

Resizing images using AWS Lambda - issue

I'm trying to resize images automatically using Amazon S3/Lambda. The problem is I cannot get any connection to Amazon S3 buckets while creating a Lambda function. Creating a new blank function in AWS Lambda Using Python 3.8 Setting permissions to…
biggydeen
  • 21
  • 2
2
votes
1 answer

How can I get AWS cloudwatch logs into GCP stack driver logs viewer?

I have set up the "connector account" thing in Stackdriver, and I'm able to see metrics in GCP, which is super cool! I would now like to also get all cloudwatch logs into google's logging tool. Can this be done with the connector account as well? Or…
2
votes
1 answer

Is DynamoDB latency almost the same as RDS latency?

I am exploring using AWS Lambda through Laravel Vapor. Avoiding the use of Redis can save us ~$56/mo (t2.small at ~$24, NAT Gateway at ~$32). Instead of Redis, I plan to use DynamoDB which is much cheaper. Pretty much same thoughts to this thread…
2
votes
2 answers

Trigger AWS Lambda by S3 object GET

My Problem I have a public S3 bucket which serves as a storage solution for large files (GBs) that I send to colleagues and clients. The files are auto-deleted after a few weeks. The problem with this setting is that I may suffer significant charges…
Adam Matan
  • 13,194
  • 19
  • 55
  • 75
2
votes
2 answers

Using Lambda functions to create a REST API

We have a web app that is powered by an API made up of AWS Lambda functions. For the API, we have three environments (prod, staging, and demo). We were developing the functions using serverless-offline and the functions look like this (there are 84…
1
vote
0 answers

AWS lambda add-permission --source-arn weirdness

I'm following this guide on setting up a lambda function to subcribe to log events. In step 5 you need to "Grant CloudWatch Logs the permission to execute your function" like this: aws lambda add-permission \ --function-name "helloworld" \ …
spinkus
  • 188
  • 2
  • 16
1
vote
2 answers

Running AWS Lambda in same VPC as DocumentDB or DynamoDB

We are currently running our AWS Lambda's in a VPC due to an earlier architectural decision. We are also using MongoDB Atlas and a peering connection setup between the VPC and Atlas. This obviously is causing longer cold starts with the need of…
1
vote
1 answer

AWS Cloudwatch log filter on stream name

I'm trying to setup a lambda function to process logs from an AWS instance. To do that I'm configuring a CloudWatch Logs "trigger" as input to my Lambda function. The relevant configuration UI on AWS console is shown in the screen shot below for…
spinkus
  • 188
  • 2
  • 16
1
vote
0 answers

AWS Lambda: How to install linux dependency packages?

I'm trying to perform HTML to PDF conversion with class library in AWS lambda function. The HTML converter has some dependency packages to be installed in the environment where the conversion takes place. So, I tried to install the packages using…
Prakash
  • 11
  • 2
1
vote
1 answer

AWS Lambda boto3 : Instance launch from lambda boto3 python but not launching

while trying launch instance from python function instance not launching but not getting python syntax error. region = 'us-east-2' ec2 = boto3.client('ec2') ec2 = boto3.resource('ec2') client = boto3.client('ec2') def lambda_handler(event,…
1
vote
1 answer

What would be the best service for "append only" events in order for quick load times in lambda function

I have a stream of events happening in the new CW Event Bridge that I need to get some statistics on from a REST API endpoint, a lambda function (python + pandas). What is the best AWS service to store this data so that it's quick to load in a…
Kimvais
  • 315
  • 3
  • 17
1
vote
1 answer

Lambda cloudwatch trigger in Terraform for Logzio

I can create a Cloudwatch Log trigger in the Designer section of the Lambda dashboard by following these instructions. Everything works as expected. But, I'm having a very difficult time setting these up in Terraform. I'm trying to subscribe the…
aberg
  • 11
  • 1
  • 5
1
vote
1 answer

Triggering Lambda function when my application port is down

I want to trigger a Lambda function when my application port is down (application is running on Amazon EC2). So please let me know of any solution. Thanks in advance.
Gayathri K
  • 139
  • 5