Questions tagged [amazon-lambda]

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

Filter by
Sorted by
Tagged with
11 votes
4 answers
16k views

AWS SQS + SNS + Lambda

I was wondering if I can send a message to SQS queue and subscribe an SNS topic to it to trigger a lambda for sending an email. SQS -> SNS -> (Lambda) -> SES I know SNS messages can be sent to SQS ...
Chida's user avatar
  • 2,511
9 votes
2 answers
26k views

How to get the IP Address for a specific AWS ECS task?

I am attempting to build my own version of service discovery within ECS, since the services that I wish to scale up and down are not HTTP servers and so cannot be managed by ELB. Also, ECS doesn't ...
Jake Feasel's user avatar
8 votes
1 answer
4k views

AWSLambdaExecute policy definition

Foreword: I'm not asking for configuration help. My use case is covered and working fine. This is a theoretical question. On AWS there is a policy called AWSLambdaExecute which is defined as follows: ...
Notinlist's user avatar
  • 217
7 votes
1 answer
8k views

IP Address exhaustion for lambdas in VPC

I am currently part of a group that is dealing with the repercussions of deploying 300+ AWS Lambda functions running Node.js in place of a more traditional REST API. I recently implemented an ...
SirCapsLock's user avatar
6 votes
1 answer
6k views

Connecting to SMTP server from AWS Lambda

On my AWS Lambda function, my javascript code times out whenever I try to use nodemailer to connect to my Amazon SES SMTP server (port 465). However, if I run the script locally, it works fine, which ...
user avatar
6 votes
1 answer
363 views

How to stop Lambda from incurring CloudTrail charges related to CreateLogStream?

I manage an actually not very big website, but Lambda is used extensively, invoked many times per site visit, resulting in hundreds of thousands of calls per month. I noticed a spike in CloudTrail ...
Alex R's user avatar
  • 1,073
6 votes
1 answer
6k views

Why does AWS Lambda need to pass ecsTaskExecutionRole to ECS task

I am writing an AWS Lambda function to trigger an ECS Fargate task. I am following the example provided at Run tasks with AWS Fargate and Lambda. While my setup works, there is one of the parts ...
user35042's user avatar
  • 2,711
5 votes
2 answers
464 views

How to choose between Elastic Container Service (ECS) or Elastic Container Registry (ECR), Elastic Beanstalk, and Lambda?

Background: I've worked with EC2 and RDS. Recently I received a query from a client in which he wants to develop both mobile and web applications using Amazon Web Services, and need advice on which ...
the_jerryyy's user avatar
5 votes
1 answer
7k views

AWS SQS behavior with multiple Lambda Triggers set

I've got an SQS queue set up with multiple Lambdas configured as triggers. While this is allowed by AWS's API it's not clear what the intended behavior is. For example, is one message pulled off the ...
Matthew 'mandatory' Bryant's user avatar
5 votes
1 answer
9k views

Passing parameters to AWS Lambda

I'm trying to write a CloudFormation template that subscribes a Lambda function to a CloudWatch Logs LogGroup. This Lambda function should then parse the logs and put them in to an Amazon ES cluster. ...
user1799's user avatar
5 votes
3 answers
5k views

Amazon Lambda for video and image processing?

The service I am building the architecture for has a video processing part in it. Basically, some people can upload videos (stored in S3) that will be split into frames with high resolution. From ...
christophetd's user avatar
5 votes
1 answer
8k views

AWS Permissions: Lambda access Denied to S3

I have created a Lambda Python function through AWS Cloud 9 but have hit an issue when trying to write to an S3 bucket from the Lambda Function. When I test in Cloud 9 the Python codes runs fine and ...
W. Walford's user avatar
5 votes
0 answers
533 views

What are the advantages of using AWS Elastic Transcoder (for WAV to AAC) vs Lambda and ffmpeg? [closed]

I did a price comparison between using Elastic Transcoder vs Lambda for WAV-to-AAC conversion. I have to say, AWS ET is significantly pricier than Lambda. A 9-minute audio file transcoded using ET: $...
ffxsam's user avatar
  • 443
4 votes
2 answers
11k views

AWS, SQS trigger to Lambda is automatically disabled when Lambda fails

We have some Lambdas triggered by SQS queues. The Lambdas do intensive inserts into DynamoDB tables. The DynamoDB tables have autoscaling write capacity. On peak loads, many numbers of messages come ...
gelin's user avatar
  • 71
4 votes
1 answer
3k views

how to see logs produced by aws lambda function using aws cli

I have lambda function written in golang. I run it through calling HTTP API gateway. It works fine but I would like to see logs written in stderr which are produced by my golang program. I tried this ...
Maxim Yefremov's user avatar
4 votes
1 answer
769 views

AWS lambda fails to access internet, despite having proper IGW, NAT and routing table entries?

I am experimenting with AWS Lambda, with a small piece of code that would fetch some files from S3. Unfortunately I cannot even access internet resources when I put my Lambda function into a VPC, ...
Peter G. Horvath's user avatar
4 votes
2 answers
944 views

Creating a CloudWatch Scheduled Event with arbitrary data in the `detail` field

I'd like to run a Lambda task on a fixed schedule, with some configuration passed into it by the CloudWatch Scheduled Event that triggers the task. Looking at the documentation here, I can see that ...
Chris's user avatar
  • 347
4 votes
1 answer
3k views

AWS Lambda, AWS API Gateway, AWS Cloudfront gives 403 error

I run a Django project deployed on AWS lambda using serverless Zappa framework. This can be accessed by a randomly generated link from AWS API Gateway lets say:- randomly-generated-link.aws.amazon....
Abishek's user avatar
  • 141
4 votes
1 answer
5k views

what is "period" column represent in AWS cloudwatch metric graph?

I created the number metric graph for lambda function like latency, the total number of invocation etc. I also created a custom metric filter which will give me errors and warnings count in logs for ...
Aniket patel's user avatar
4 votes
2 answers
2k views

AWS Route53 & Lambda: Redirecting Naked HTTP requests to HTTPS WWW for a serverless application

Problem I have a site running on a 'serverless' AWS Lambda function. Route53 routes requests to the API Gateway which connects to the Lambda function. The problem with this is that you can't setup ...
Emile Petrone's user avatar
4 votes
1 answer
2k views

AWS cloudwatch not triggering lambda function

I am trying to create a scheduling system for my EC2 instances using lambda functions to start/shutdown the instances and Cloudwatch to trigger and schedule them. The problem is Cloudwatch, not ...
Hope's user avatar
  • 41
4 votes
1 answer
5k views

Binary body passthrough from API Gateway to Lambda

I think I've closely followed the documentation and tutorials I've found so far, but I still get this to work. I just can't convince AWS not to touch the binary data I'm posting in the body. In my app,...
Ates Goral's user avatar
3 votes
2 answers
2k views

AWS restore_db_cluster_from_snapshot yet no instances

I'm writing an AWS lambda function to take my most recent snapshot of our production database and restore it as a new DB. This worked fine as a RDS instance but we recently switched our main DB to ...
Ryan Grush's user avatar
3 votes
2 answers
3k views

AWS Lambda automatically use latest layer

We have a server-less stack that relies on multiple AWS Lambdas to perform tasks. To help make code re-usable we have multiple Lambda Layers shared across the Lambdas. Our issue is, when we make a ...
react-dev's user avatar
  • 233
3 votes
1 answer
1k views

Can't deploy same lambda in multiple regions from s3 bucket

We are deploying a lambda using CloudFormation SAM templates. We would like to package the lambda into an S3 bucket, then deploy the AWS::Serverless::Function in multiple regions. However, lambda code ...
mdarwin's user avatar
  • 121
3 votes
1 answer
3k views

Update Amazon RDS Certificate SSL Issue with MySQL Lambda

Like many people I have updated my Amazon RDS Certificate to CA_2019 from CA_2015. At first everything seemed fine but later on checking I noticed the mysql lambda function which i wrote to query the ...
Sabbir Ahmed's user avatar
3 votes
1 answer
4k views

A CloudFormation stack hangs on creation or deletion when custom resource lambda is broken

I have noticed that if a template contains custom resource lambda, which is broken (there is a runtime error, or it doesn't properly send a response body), then the CloudFormation stack hangs on the ...
Andremoniy's user avatar
2 votes
1 answer
3k views

Configuring X-Ray in Lambda with AWS CloudFormation vs TracingConfig

We have an AWS Lambda (part of a broader AWS stack) that is configured using CloudFormation. It is being demanded that we implement/configure X-Ray on this Lambda. Company policy forbids us (on a ...
Steverino's user avatar
  • 133
2 votes
1 answer
4k views

How can I search across CloudWatch log groups on AWS?

I have a number of lambda functions which run my serverless backend. Something somewhere is misbehaving, and I need to bring up/search all the logs from a particular time — from all log groups, not ...
Mike Ashelby's user avatar
2 votes
3 answers
5k views

How can trigger S3 (different region ) event from lambda?

I can create lambda trigger using S3- same region. But while creating trigger using different region S3 getting error The bucket imebuckt must be in the same region as arn:aws:lambda:ap-south-1::...
sanjayparmar's user avatar
2 votes
2 answers
670 views

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 ...
Adam Matan's user avatar
  • 13.4k
2 votes
2 answers
4k views

How can I sync data or trigger a Lambda when Cognito user attributes change?

I'm trying to sync user data (name + some custom attributes) from an AWS Cognito user pool to a DynamoDB table. Cognito has a lot of triggers related to sign in / sign up but I haven't found any ...
Sampo's user avatar
  • 261
2 votes
2 answers
268 views

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-...
Mahesh Samudra's user avatar
2 votes
1 answer
2k views

AWS CloudFront - redirect root domain requests

First time poster on serverfault, apologies if this is in the wrong place. I have a website that I am trying to set up on AWS CloudFront. It is currently configured to serve static web content from S3,...
lek's user avatar
  • 23
2 votes
1 answer
535 views

AWS - lambda versions to different gateway stages?

Coming from a "classic/standard" development I'm used to have different deployment stages, e.g. staging and production, each one with its application version. AWS Lambda functions and API ...
fudo's user avatar
  • 141
2 votes
2 answers
2k views

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 ...
John Heyer's user avatar
2 votes
1 answer
139 views

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 ...
biggydeen's user avatar
2 votes
2 answers
900 views

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 ...
Askdesigners's user avatar
2 votes
1 answer
3k views

AWS: Connecting Lambda to a Secret doesn't work

I am trying to connect a Lambda to a secret as per AWS docs. I set the following resource-based policy on the secret, and verified that it has indeed been set: { "Version": "2012-10-...
user2733807's user avatar
2 votes
2 answers
498 views

Deploy hundreds of thousands of short lived jobs per day

I have a system that needs to deploy hundreds of thousands of short-lived jobs per day. Each job runs anywhere from a few seconds, to a couple of hours. Each job makes HTTP requests to external web ...
Brett's user avatar
  • 121
2 votes
1 answer
2k views

Connect an AWS Lambda function triggered by API Gateway to Aurora Serverless MySQL database

I have an AWS Lambda function which is being successfully run via a HTTP request to an API Gateway. It returns a JSON response which I can see in my local web browser. Now I want it to gather data ...
Rob Fisher's user avatar
2 votes
1 answer
5k views

AWS API Gateway with Lambda and KeepAlive (persistent connections)

I'm a bit confused about Keep-Alive with AWS API Gateway. Is this something I need to configure? or maybe be careful with this setting? Because I will use API Gateway to execute Lambda functions, and ...
Enrique's user avatar
  • 143
2 votes
1 answer
2k views

When happens when I reach max concurrent Lambda functions

I have 200 jsonl (json-lines) files in an s3 bucket. Each file contains 100,000 JSONs to be written into a DynamoDB. I want to use Lambda to download the file from S3, and batch-write it into the ...
keithRozario's user avatar
2 votes
1 answer
981 views

SNS -> Lambda: What happens when Lambda throttles

I have a lambda function subscribed to an SNS topic. I wonder, what will happen when that lambda function is throttled? Will SNS ensure that the message is delivered later? Will the message got ...
Maleks's user avatar
  • 121
2 votes
2 answers
2k views

What is a practical difference between RPC and FaaS?

There seems to be a lot of hype around serverless computing these days and I try to understand what is the major difference between the remote procedure call framework? As far as I am concerned - it ...
Dzh's user avatar
  • 205
2 votes
1 answer
2k views

What's the fastest way of getting data into an AWS Lambda?

I have something I'll call a "microservice" running on AWS Lambda (using node.js). Basically it serves up condensed summaries drawn from a few hundred megabytes of binary blob. There are a lot of ...
timday's user avatar
  • 866
2 votes
1 answer
1k views

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....
Randabut's user avatar
2 votes
1 answer
970 views

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 ...
jcsoriano's user avatar
  • 121
2 votes
1 answer
161 views

How to measure GB-seconds for AWS EC2

We are researching on the possibilities of moving our app from EC2 based implementation to AWS lambda. We are trying to project how much money we will be saving if we do so. The lambda pricing says it ...
user3360140's user avatar
2 votes
4 answers
1k views

I have SQS -> Lambda -> SNS (my messages end up in the dead letter queue)

I have a Lambda function that has a fixed concurrency of 1 that has an SQS trigger configured with a batchSize of 10. This Lambda function only publishes whatever it encounters to an SNS topic (the ...
Julian's user avatar
  • 545