Questions tagged [amazon-lambda]
This tag is for questions about Amazon Web Services' "Lambda".
140
questions
0
votes
0
answers
8
views
Creating a custom CloudWatch Event to monitor every new commit for GitHub repository instead of CodeCommit repo state change
Could you please assist me in understanding if it is possible to create a custom CloudWatch Event to monitor every new commit for GitHub repositories instead of CodeCommit repo state changes? It has ...
0
votes
0
answers
12
views
AWS Lambda triggered by SQS - Maximize Messages per Call
i have a pretty busy SQS Queue which triggers a Lambda function. However, i think it would make a great cost reduction if one Lambda Call would contain 10 messages instead of 1-5 messages. SQS ...
1
vote
1
answer
43
views
How do you set a self-destruct or maximum uptime in AWS?
Situation
We have a sandbox AWS account for trying things out. It is not for production, purely just for playing around with all the toys that AWS provide. We want to encourage everyone to explore and ...
1
vote
1
answer
189
views
CloudFront does not seem to invoke lambda@edge function
I have a CloudFront distribution. The origin is an S3 bucket that uses OAI.
I have created a lambda@edge function following directions from https://aws.amazon.com/blogs/compute/implementing-default-...
0
votes
0
answers
20
views
Build pipeline to upload .jar package to AWS Lambda
So far according to the documentation at https://docs.aws.amazon.com/lambda/latest/dg/java-package.html, the only way to upload .jar code to an AWS Lambda function would be to manually upload the file ...
0
votes
1
answer
19
views
Sending push notification to s3 origin website from lambda
I want to send a websockets notification from lambda function to clients, on a website hosted via s3 origin with cloudfront.
Could someone help me with this, please? Thanks.
1
vote
1
answer
106
views
What is causing BadRequestException when calling the ExecuteStatement operation on Aurora Serverless db
I have a lambda function that retrieves records from AWS Aurora Serverless db. Now I thought of adding api gateway to trigger the lambda function but I get this error
Connect an AWS Lambda function ...
0
votes
0
answers
50
views
Extracting data from Google Analytics GA4 property using AWS Lambda
I am trying to extract GA4 data and store it in a S3 bucket using AWS lambda function. But I am getting an error.
"<HttpError 400 when requesting https://analyticsreporting.googleapis.com/v4/...
0
votes
0
answers
12
views
Google cloud functions contains whole application code unlike aws lambda which contains only function specific code
I was using aws lambda for few projects. In lambda i can package only function specific code so every function has only its own code. and now i am using google cloud functions for my new project. I've ...
-2
votes
1
answer
25
views
How does efs pricing works lambda?
Does the pricing only applicable for storage or there are also other charges associated wit it?
for eg: if a lambda function puts 1Gb/s of file on efs via a private vpc then how much it will charge ...
0
votes
0
answers
12
views
Async lambda function times out even though in same vpc
I have a lambda function which should invoke another lambda function asynchronously but every times I run it times out no matter how many minutes I give it to the function.
They are both in same ...
0
votes
0
answers
43
views
Long processes in AWS lambda
Forgive me if this question is answered elsewhere but most references to long lived AWS Lambda are about process runaway or something going wrong.
My question is: is Lambda (or whatever is Microsoft'...
0
votes
1
answer
51
views
Deploying a Serverless site behind CloudFront
I use Serverless to deploy a website to an AWS Lambda. This works fine. I now want to use CloudFront to proxy access to this Lambda and cache requests for static files.
I have set up a CloudFront ...
1
vote
0
answers
93
views
Does freezing the cgroup wait for TCP send buffers to be flushed?
What guarantees are there for flushing the TCP send buffers, if any, when the freezer subsystem freezes a cgroup?
Consider the following scenario: Server A, which runs in a cgroup, sends data to ...
1
vote
1
answer
1k
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 ...
1
vote
0
answers
28
views
Is there a 1:1 correspondence between CodeDeploy applications and a Lambda?
We're investigating CodeDeploy for automating deployments of a service that is comprised of:
Multiple Lambdas, with some triggered by SQS queues and others
accepting HTTP requests via API Gateway
API ...
0
votes
1
answer
153
views
Lambda with VPC long cold start
I have few lambda functions that are connecting to Mongo Atlas cluster. Connection between Mongo Atlas and my AWS account is done via VPC Peering. Lambda functions are attached to this VPC.
I'm ...
1
vote
1
answer
41
views
How can I track user requests to my external API on AWS?
I'm a bit of a beginner but I'm working on creating an external API with AWS SAM (using API Gateway and Lambda), and I want a way to track & monitor usage.
Some options I was considering:
1. Store ...
-1
votes
1
answer
108
views
How to add IP to in existing inbound rule in a security group of Amazon EC2?
I am using Amazon API via a Lambda function to allow my teammates access my server.
Using post method I am invoking this lambda function to add teammate's IPs in inbound rule.
I want to add IPs to an ...
0
votes
0
answers
579
views
How can I set up my HostedZone so that it delegates to a parent DNS record in another AWS account?
Introduction
I have some TypeScript code that uses CDK to create an API Gateway and a Lambda. It works and deploys to a standard AWS URL. So far so good.
I now need to transfer the API Gateway so that ...
1
vote
0
answers
33
views
Autoscaling - lifecylehook implementation
I'm trying to implement my first ASG with a lifecycle hook and I am having this issue:
LifecycleHandlerFunction: Encountered unsupported property Role
The following resource(s) failed to create:
[...
0
votes
2
answers
279
views
Modify AWS Lambda function inside CloudFormation stack
I've launched this stack and needed to update it's Lamdba function, I've made some amendments and hit deploy, a new version of function was saved, however Lambda application still refers to the first ...
0
votes
1
answer
121
views
Kubernetes + AWS Lambda [closed]
I currently have an API service running on AWS Lambda, but it's getting expensive due to high AWS costs. My aim is to replace 95 % of the usage with a cluster of servers and still handle peaks with ...
1
vote
0
answers
68
views
How to access a private ELB URL in AWS Lambda
I have an ELB that is pointing HTTPS (443) - https://dummyendpint.com. This is in Private VPC and exposed to only whitelisted IP addresses.
Now I am working on this endpoint (https://dummyendpint.com) ...
0
votes
1
answer
462
views
AWS lamba start_instances gives pending response but console still shows stopped
I have a lambda function that I have setup to start an instance:
import boto3
ec2 = boto3.client('ec2')
response = ec2.start_instances(
InstanceIds=['i-xxx']
)
print(response)
The response looks ...
0
votes
1
answer
78
views
How do i add nodejs runtime layer layer to my Python Lambda on AWS?
wscat test
In my Python lambda I want to use wscat which requires node:
$ /opt/wscat-layer/bin/wscat
/usr/bin/env: node: No such file or directory
Question:
How do I add nodejs runtime to my Python ...
5
votes
1
answer
82
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 ...
1
vote
1
answer
850
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 ...
0
votes
1
answer
35
views
What could be a best solution for ElasticBeanstalk environment stop/start for cost saving
So i have a use case where we only need Elasticbeanstalk environment only in weekdays and in business hours only. So here at the moment i'm using a lambda function which terminates App environment and ...
0
votes
1
answer
240
views
How to stream CloudWatch log group to specific Lambda function version?
When creating a new subscription filter for a CloudWatch log group, the AWS Console doesn't seem to offer a way to select a specific Lambda fn version. This is important for CI/CD where I might want ...
2
votes
1
answer
776
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....
0
votes
1
answer
166
views
Lambda connect to mongodb which only allow localhost connection in ec2
I have a MongoDB which only allow connection from localhost, running on my ec2. Currently, only my nodejs app which runs on the same ec2 instance connects to the mongodb using this command mongoose....
3
votes
1
answer
973
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 ...
2
votes
1
answer
96
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 ...
0
votes
1
answer
236
views
Compiling and running untrusted code on a server
In teaching CS, students submit their code to our server and we compile and run with unit tests. Similar to Codeforces, Codewars, and HackerRank.
How should we be configuring servers for this? Launch ...
2
votes
2
answers
1k
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 ...
1
vote
0
answers
65
views
Serverless Lambda infrastructure for listening to Websocket
I'm still new in the AWS Lambda & Api Gateway world, but it seems a good fit to my new project.
I still have some concerns, and I'll be very happy if you can assist.
In my new project (Financial ...
0
votes
2
answers
48
views
Using AWS lambda or Google Functions to run the a large number of parallel instances of the same script with different arguments [closed]
I have a script for collecting data for different social media hashtags. The script currently makes a bunch of sequential HTTP requests, formats the data into a Pandas data frame, and saves it to a ...
1
vote
0
answers
55
views
AWS data storage: how much to store with Cognito
I am new here.
This is rather a choice-based question rather than purely technical one.
Many mobile apps authenticate with Cognito, and I am going to use the same for ease of use + free tier ...
2
votes
1
answer
401
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 ...
1
vote
1
answer
37
views
How does AWS Lambda pass logs to CloudWatch Logs?
AWS somehow aggregate stdout and stderr of a lambda. I once bumped to a situation where a subthread of a lambda process stopped logging in the middle(using async technology was such a bad idea). I'm ...
1
vote
1
answer
2k
views
Why can't my AWS Lambda connect to my AWS RDS proxy?
I can connect to my database locally just fine (of course with the normal DB endpoint, not the proxy endpoint).
However, I just can't seem to get my lambda function to connect to the same database ...
1
vote
1
answer
485
views
AWS API Gateway to Fargate, only charge when request is running
From the following link, it seems possible to call a Fargate task from the API Gateway:
https://aws.amazon.com/blogs/compute/introducing-amazon-api-gateway-private-endpoints/
But, does the task have ...
2
votes
1
answer
660
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 ...
2
votes
2
answers
455
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 ...
0
votes
1
answer
1k
views
How to decrypt Secure String values in Parameter Store using .NET Core's AmazonSimpleSystemsManagementClient
I have the following code in a Lambda function:
var ssmConfig = new AmazonSimpleSystemsManagementConfig
{
RegionEndpoint = RegionEndpoint.APSoutheast2
};
...
0
votes
0
answers
671
views
Can't connect to a public accessible AWS RDS
I was running a serverless web application on a lambda inside a VPC, and connecting to a Aurora-MySQL RDS instance, with inbound rules to allow traffic from the security group of the lambda
The ...
5
votes
2
answers
336
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 ...
1
vote
1
answer
1k
views
using an aws lambda as a node webserver
I have heard of people using AWS lambdas as a place to run node express webservers which to my mind is an awful idea for the following reasons:
it is hard to run them in a similar state locally
This ...
2
votes
1
answer
102
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-...