Questions tagged [amazon-lambda]
This tag is for questions about Amazon Web Services' "Lambda".
153 questions
0 votes
0 answers
129 views
AWS Lambda "function couldn't connect to the Amazon EFS file system"
I have been struggling for days trying to get a deployment of Lambda+EFS that actually works I am using Pulumi in Python Everything I've tried results in: Calling the invoke API action failed with ...
0 votes
0 answers
86 views
AWS - consuming free tier SQS queries
I have a simple personal project I work on from time to time to learn AWS. Recently I received an alert emailk from aws stating that I'm reaching the free tier quota for one or more services with the ...
1 vote
1 answer
1k views
Best approach to install gdal for rasterio in aws/lambda/python Dockerfile
The python dependencies for an AWS lambda application have exceeded the 250 MB limit for AWS Lambdas. One of these dependencies is rasterio which depends on gdal. I'm attempting to build a docker ...
1 vote
1 answer
125 views
Debugging Lambda Connectivity to EC2
I have a simple Lambda deployed into my VPC that is making a call to an EC2 host in the same VPC (and subnet). They both share an SG and I've used the Reachability Analyzer (from the Lambda ENI to ...
0 votes
1 answer
955 views
AWS: Migrate go1.x runtime to al2 in order to deploy Lambda functions
I'm trying to migrate to the AL2 runtime from go1.x to deploy my Lambda functions but I'm having troubles with how to do so. I use the Serverless Framework for deployment in conjunction with make. ...
0 votes
0 answers
86 views
What AWS architecture would be mosted suited for a SaaS that uses uses git repositories as data storage?
I am currently working on an application that is dealing with frontmatter markdown files 99% of the time (some things have to communicate with a DB like RDS). Locally, I have a folder that stores all ...
0 votes
1 answer
818 views
Cannot create aws lambda function. error: the following arguments are required: --runtime, --handler
I am trying to deploy an image to be run in aws lambda at a scheduled interval. I have built and tested the image using RIE and locally it runs as it should. Next I have pushed the image to aws ecr to ...
1 vote
1 answer
762 views
Is there an easy way to link AWS Cloudfront authorization to Google Workspaces?
Is there an easy way to link AWS Cloudfront authorisation to Google Workspaces? I'm trying to achieve single sign on to a Cloudfront hosted static website such that anyone with a corporate email ...
0 votes
0 answers
147 views
What's the best way to deploy large numbers of low-throughput docker containers on AWS?
What's the best, simple way of deploying a lot of containers to AWS? It's necessary to be scalable but cheap if a container sees little or no use. I have a method of generating docker containers that ...
0 votes
0 answers
733 views
AWS SAM - cannot create stack with api gateway using stage variable for invoked lambda version
Ok, previous question about using different lambda versions on different stages here: AWS - lambda versions to different gateway stages? Now I'm trying to put it all together using AWS SAM cli but ...
2 votes
1 answer
2k 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 ...
1 vote
1 answer
1k views
AWS: API gateway 502 error randomly with Runtime segmentation faults
I am using AWS and have an api which is called via API gateway which calls a node.js lambda function. Very often but randomly I get 502 responses but when I immediately try again with the exact same ...
0 votes
1 answer
609 views
nginx to reverse proxy 2 local lambdas in docker containers
I have 2 lambda functions wrapped in docker containers and am using docker compose to run them together. One runs on port 9000 the other on port 9001. I am trying to use nginx to allow them to both ...
0 votes
0 answers
722 views
Will AWS Lambda deployed from image pull the ECR image on each new instances get initialised
Because of Lambda’s ZIP deployment size limitation I’m changing the way I deploy my Lambda functions to use container image. The deployed function is located within a VPC, so I have a NAT gateway ...
0 votes
1 answer
1k views
Building PHP 8.1.8 with open SSL, failing unable to find package. Lambda Layer
I'm trying to build a PHP8.1.8 lambda layer however i was following https://aws.amazon.com/blogs/apn/aws-lambda-custom-runtime-for-php-a-practical-example/ And just using the correct version, so the ...
0 votes
1 answer
2k views
Use AWS SAM to Create AWS Lambda Layer for Python (Serverless Application Model)
I'm trying to use AWS SAM / Serverless application Model to deploy a combination of Python and native libraries to Lambda as a layer, for use from a Python Lambda function. I'd appreciate some help ...
0 votes
0 answers
524 views
Is it possible for me to identify what services are using an AWS Lambda function?
I'm trying to clean up some Lambda functions in our account. When I click on the Monitor tab for each function, everything is coming up with "No data available". I know at least one of those ...
1 vote
0 answers
228 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 ...
2 votes
1 answer
263 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
3k 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
424 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
95 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.
2 votes
1 answer
963 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
30 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
478 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
1 answer
194 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
211 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 ...
2 votes
1 answer
7k 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
49 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
738 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
550 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
707 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
1k 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
78 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
1k 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
174 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
223 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) ...
1 vote
1 answer
2k 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
333 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 ...
6 votes
1 answer
631 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 ...
2 votes
2 answers
3k 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
77 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
704 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
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....
0 votes
1 answer
423 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
2k 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
209 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
390 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 ...
3 votes
2 answers
4k 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
127 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 ...