Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [amazon-lambda]

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

3
votes
1answer
174 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 ...
0
votes
0answers
24 views

Dynamic Lambda alias with ALB

Is it possible to invoke a lambda alias based on the request using application load balancer? I would like to take part of the hostname, or part of the path, if either would work mytenant---some-...
3
votes
1answer
117 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 ...
0
votes
2answers
54 views

Webapp with Python back-end. Should I use AWS Lambda?

I want to build a webapp with Python back-end. The front-end of the webapp will just have a simple input box where the user puts an address. Then, on the back-end I want to scrape content from the ...
0
votes
1answer
31 views

AWS Lambda needs to be moved in different Subnet

I have a Lambda function that is in VPC-A and Subnet 1A and 2A. I want to move it to Subnet 1b and 2B. The command below is giving error: aws rds modify-db-subnet-group --db-subnet-group-name "XXXX" ...
4
votes
2answers
107 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 ...
3
votes
1answer
83 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 ...
0
votes
0answers
11 views

How do you configure a parameterized path for a lambda function in Amazon API Gateway?

I am trying to expose an existing lambda function through the Amazon API Gateway. The lambda function is expecting the parameters as pathParameters. For example: { "pathParameters": { "...
1
vote
0answers
84 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 ...
0
votes
2answers
199 views

Python Lambda Network Error

Yesterday I started developing a serverless application in AWS including python lambdas. After testing my code I wasn't able to save it. Normally after pressing "Save" the button changes the color to ...
1
vote
1answer
34 views

Heroku + AWS Lambda Hybrid

I currently have a web app running fully on Heroku. This web app needs a lot of computing power and access to several external APIs during short time periods, and nothing at all if there is no ...
0
votes
0answers
33 views

In what region will an API Gateway + Lambda function execute?

I'm trying to understand how / where my Lambda functions are executed + from where content is pulled (via DynamoDB & S3). For example, what routing would occur if someone in India hits my API ...
1
vote
1answer
428 views

AWS Lambda as an Application Load Balancer target?

At AWS’ 2018 re:invent, AWS announced that Lambda functions can now be the target of Application Load Balancers (documentation here). I just want to ensure that I understand AWS previous offerings (e....
1
vote
1answer
451 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 ...
1
vote
1answer
74 views

Lambda Scheduling Gets Stuck

I have an SQS queue with a batch size of 1 Lambda function with a reserved concurrency of one Lambda is configured to listen on the queue and do some work when messages arrive. Said work typically ...
4
votes
1answer
512 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 ...
2
votes
1answer
283 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 ...
3
votes
1answer
49 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, ...
2
votes
3answers
199 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 ...
3
votes
1answer
205 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 ...
1
vote
1answer
107 views

Getting issue with VPC in Lambda function

I have attached VPC and private subnets in Lambda function. That is causing the connection issue with the API Gateway/other AWS services. Can anyone suggest the solution for this? Thank you.
1
vote
1answer
375 views

Editable URL Rewrite Map for CloudFront/S3 Website using Lambda@Edge

I'm migrating a static website from IIS to Amazon S3, using CloudFront for https. The old site used the URL Rewrite module and had 301 redirect maps with over 200 entries. Here is an example: example....
1
vote
1answer
83 views

Using AWS Lambda polling with external SQS

I am mostly trying to figure out if what I need is even possible, if someone has pointers as to how, that would be even better. I have an access key/secret from an organisation I work with, that ...
0
votes
0answers
6 views

how to disable debug logging in aws opsautomator tasktrackinghandler table?

I see that aws opsautomator logging in tasktrackinghandling log group only it is set to debug logging. I dont find debug logging in other log groups of ops automator in aws. We use ops automator only ...
0
votes
1answer
278 views

Connecting from an AWS Lambda function or service within a VPC to a customer's private network over VPN tunnel

We are currently running AWS Lambda functions within a VPC and for example already have a peering connection setup to MongoDB Atlas to have our AWS Lambda's within the VPC communicate to our MongoDB ...
0
votes
0answers
36 views

How to block a request which does not has a header using Amazon Web Services

My application back-end was laid on AWS Lambda and exposing API's using API Gateway. And forntend on CloudFront. I want to block a request which does not has a header using AWS service. Can anyone ...
0
votes
0answers
261 views

AWS Lambda: Using CORS & Lambda proxy to expose cloudfront signed cookies

I'm building a full javascript app from Salesforce.com API with no server side script that will be hosted on salesforce.com domain (https) This app should be able to grant access to multiple files ...
0
votes
0answers
80 views

AWS API Gateway/Route 53 working on 1 Base Path Mapping while giving the other a Missing Authentication Token error

I have my API Gateway hooked up to 2 Lambda expressions for the custom domain-name api.pyumipsum.com I then have it setup in Route 53 as a CNAME to api.pyumipsum.com But for some reason, anytime I ...
0
votes
1answer
605 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 ...
0
votes
0answers
147 views

AWS Lambda Function to dynamically add and remove public ip to security group

I was looking for a way through which I can add and remove rule in specific security group. Background: I am building an AWS Code Pipeline which will allow EC2 instance to pull code from AWS Code ...
1
vote
0answers
192 views

The way AWS Lambda@Edge accesses to S3 restricted by Object Access Identity (OAI)

I have a question. Is the Lambda function (written in node.js) associated with CloudFront accessible to S3 objects restricted by Object Access Identity (OAI)? If yes, could you tell me how to access? (...
0
votes
2answers
48 views

What level of permissions should my developer need in AWS?

I'm hiring a developer to create a project for me. He asked me to create an AWS Lambda account so that he could create the application. I created a user with access to the full AWS Lambda policy but ...
0
votes
1answer
341 views

MongoDB hosted on EC2 connection issue

I am a front-end programmer trying to learn more backend technologies. I setup a Mongo database on an EC2 server, and I have a lambda function that I'm trying to make connect to my mongo database. ...
0
votes
0answers
64 views

AWS serverless setup for recurring tasks?

I have a database consisting of many items. At least one time per day I want to loop through all items in this database and for each item, call an external API to fetch current data about this item ...
0
votes
0answers
97 views

How to debug AWS SNS not delivering message to Lambda

I have an SNS topic for operator notifications to which I have a Cloudwatch Alarm attached. I have a Lambda subscribed to the topic that should post the notifications to a slack channel. Unfortunately,...
1
vote
1answer
176 views

Python packaging (passlib, argon2) for AWS Lambda

I am trying to create a Python function for AWS Lambda that uses the passlib library for password hashing with argon2. To this end, I am using pip to install the following packages in a local ...
0
votes
1answer
57 views

AWS Lambda Policy - Allow to edit lambda functions depending on the user

When creating AWS Policies, is there a way to create a policy that Allow to view, edit and create lambda functions depending on the user that create that function before? I'm trying to do that, but I ...
2
votes
0answers
1k views

Allow other AWS services to invoke Lambda using IAM

Is it possible to grant AWS services (e.g. API gateway, Secrets Manager) permission to invoke a Lambda function using only IAM roles? Normally this is done in the function's policy (resource-based ...
0
votes
0answers
14 views

Cloudwatch AND/IF/OR statement

I'm looking for a way to alert if all of the consumers for particular a SQS queue is down over an interval of time. The thought I had was to compare messages available to messages deleted. For example,...
0
votes
0answers
37 views

How do you create an authorisation poilcy that would allow AWS Cognito to trigger Lambda?

So this may sound quite simple - But I can't seem to figure it out. I am setting up Cognito, and during the setup, I have created a user pool and a Lambda function to be triggered for migrating users. ...
1
vote
1answer
128 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 ...
0
votes
1answer
525 views

How to delete tag from EBS using boto3?

I want to delete a tag from EBS volume using boto3/lambda. At this doc https://boto3.readthedocs.io/en/latest/reference/services/ec2.html#volume I see 'create_tags()' only. It is suitable for ...
2
votes
1answer
809 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 ...
1
vote
1answer
466 views

Using boto in an AWS lambda function in a VPC

I have a lambda that accesses EC2. I want to assign it to a VPC for security purposes, but when I do boto just stops working. Here's a minimal example: ec2 = boto3.resource('ec2', region_name='eu-...
1
vote
0answers
192 views

How do I combine multiple SQS metrics with Lambda?

I have SQS monitoring for some services we have. We have two metrics that I'm looking to combine. "Receives" and "Empty Receives". Is it possible to use something like amazon lambda to create an ...
0
votes
2answers
1k views

How to configure Cloudwatch events to trigger on IAM API calls?

So I'm having trouble setting up Cloudwatch events to trigger a Lambda function. In the current scenario I want to trigger a Lambda when anyone/thing changes anything in IAM. Currently I have a ...
0
votes
0answers
534 views

Very slow imagemagick convert call when using AWS Lambda

I've got a relatively simple composite action that I'm carrying out with imagemagick on AWS Lambda. Why does it often take more than a minute to complete? This composites four smaller images "behind" ...
0
votes
0answers
79 views

AWS Lambda function to create multiple databases is only creating the first

I have an AWS Lambda function that I'm trying to use to create 3 new databases every night. It takes the most recent snapshot from each server and runs restore_db_instance_from_db_snapshot. Its meant ...
0
votes
0answers
243 views

Unable to set storage size for an AWS database cluster

I'm attempting to find a solution for this AWS restore_db_cluster_from_snapshot yet no instances however when I try to run the create_db_instance method I get the following error - *** ClientError: ...
1
vote
1answer
246 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 ...