Questions tagged [lambda]

DO NOT USE FOR THE AWS SERVICE (use [aws-lambda] for those questions!) Lambdas are anonymous functions or closures in programming languages such as Lisp, C#, C++, Lua, Python, Ruby, JavaScript, Java, Excel or Google sheets. (Also, lambda expression.)

Filter by
Sorted by
Tagged with
0 votes
0 answers
10 views

AWS Lambda triggered by S3 event not firing when file is uploaded programmatically via another Lambda

I have an AWS setup where a post Lambda function uploads an image to an S3 bucket. I also have another Lambda function that is supposed to be triggered whenever a new image is uploaded to this S3 ...
Jason Park's user avatar
0 votes
0 answers
18 views

Customize properties Values using AutoFixture

I have this code T Generate<T>() { fixture.Customize<DeploymentDetails>(tt => tt.With(x => x.Abc, "dsfsf564564&...
Jimmy's user avatar
  • 17
0 votes
2 answers
58 views

Extract Consumer variable fields while mocking Lambda expression

I have a method for batch updating a table. Problem is when i try to call below block of code it is giving class cast exception, when(session.doWork(any())).thenAnswer(invocation -> { ...
bon mohanty's user avatar
2 votes
0 answers
35 views

'Segmentation Fault' occurred when Lambda Function in Python recurves over 1e5 times

def count_cond(condition): return lambda x:(((lambda f:(lambda a:f(a(a)))(lambda a:f(lambda *w:a(a)(*w))))(lambda cc: lambda j,m: ((cc(j+1,m+1) if condition(x,m)==True else cc(j,m+1))) if m<=x ...
nik_nul's user avatar
  • 21
0 votes
1 answer
66 views

How do I wrap boilerplate code in potentially a lambda when the return type is different every time?

I'll preface it by saying the return type could by anything, it can be a string, a primitive, but it could also be classes I created. How can I have the following code broken down to a single line ...
Stephane Grenier's user avatar
2 votes
3 answers
79 views

Two objects supplier

I have a binary function: public Integer binaryFunction(Integer a, Integer b){ //some stuff } And I have this stream: Integer fixedValue = ... List<Integer> otherValues = ... otherValues....
Victoria Antolucci's user avatar
1 vote
2 answers
35 views

How do I wrap a Runnable lambda that throws a checked Exception into one that throws a RuntimeException easily

Specifically I have a list of Runnable lambdas that do something that can throw a checked Exception which in the code below will not work and give a compiler error. The code below will compile and ...
Stephane Grenier's user avatar
0 votes
1 answer
36 views

Stripe Webhooks, AWS Lambda Function URL, Raw Request Body Error

I deployed an AWS Lambda Node.js function that is triggered by the "Function URL" feature. The URL/function is registered in Stripe's webhooks and should be called when specific Stripe ...
Jay's user avatar
  • 1,604
0 votes
1 answer
14 views

Unsupported self_managed_kafka_event_source_config block type in terraform

I’m trying to create an AWS Lambda event source mapping for a self-managed Kafka cluster using the aws_lambda_event_source_mapping resource. However, I’m encountering the following error: Error: ...
Yongzhi Dai's user avatar
0 votes
0 answers
13 views

AWS how do I get notified when lambda is disabled | Alert when lambda trigger get enable or disable

Some one disable our lambda trigger(Kinesis event) Need alert or notification if someone enable or disable lambda trigger
Alkesh Mahajan's user avatar
0 votes
1 answer
38 views

Need Expert Advice on Azure Function App V2 and CI/CD Pipeline Best Practices

We're in the midst of developing a B2B SaaS application focusing on procurement services and analytics. We've designed our architecture to be robust, leveraging Azure AD B2C custom policies for user ...
Divya Porwal Jain's user avatar
-2 votes
0 answers
33 views

Applying lambda expression [closed]

In Java, can I apply lambda expression to an abstract method which is extends from an abstract class holding a single abstract method?... I was not yet tried. I have a doubt when studying this ...
Tam's user avatar
  • 1
0 votes
0 answers
25 views

Update Protobuf in Lambda

I have a lambda function that uses python 3.8 runner to forward logs and metrics from aws to datadog. After running, when AWS Security Hub does audit, it gives me this finding with a high rating: 'A ...
Ala's user avatar
  • 1
0 votes
1 answer
37 views

sendPhoto not working, doesn't throw any error (node.js, telegram-api, node-canvas)

I'm trying to develop a test telegram bot that creates a picture with a random number on it and send it to a chat. Since deploying a function that includes node-canvas from a zip file is painful I've ...
Emiliano's user avatar
-1 votes
2 answers
43 views

python - Need help converting a list comprehension to a lambda function

I am learning and practising lambda functions and came across a question that I am not able to solve. Q - Create a list of fruits with more than 2 vowels. fruits = ['mango', 'kiwi', 'strawberry', '...
rpicoder's user avatar
0 votes
1 answer
20 views

Rewrite ExpressJS Function to AWS Lambda (Multipart-Uploader)

Does someone have an idea, how to rewrite this Express.js function to AWS Lambda for Node.js 18? const upload = multer() // Receive chunk and write it to S3 bucket app.post('/upload', upload.single(&...
texi's user avatar
  • 3
2 votes
2 answers
35 views

How to pass 3 values in lambda

Lambda functions are working perfectly: funct = (lambda a,aa,aaa: (a-aa)/aaa if aa>0 else a/aaa) print(funct(200,100,2)) what I want to do is to apply this in dataframe: df[['a','aa','aaa']] using ...
PRNCSS's user avatar
  • 23
0 votes
1 answer
37 views

In aws lambda(python), xpath cannot be used with selenium

I am using AWS Lambda (python3.7) to perform web scraping. You can check the xpath of each element of the target website by using the developer tools in the Google Chrome browser on your local PC. ...
yan's user avatar
  • 45
0 votes
0 answers
22 views

Intellji Cucumber Lambda symbol given not recoginised

Newbie/refresher at Cucumber in Java and have searched stack overflow trying various fixes (removing the scope from the JUnit dependency, changing the program structure language to 10, restarting and ...
Kirsty Meredith's user avatar
2 votes
1 answer
68 views

C++: Are pointers captured by & lambdas a reference to the object, or a reference to the pointer to the object?

I was recently told that C++20 is deprecating the default capture of this when using [=]. This seems to make absolutely no sense to me as to how this was confusing in the first place. Did I just not ...
Tustin2121's user avatar
  • 2,090
0 votes
0 answers
18 views

How to setup AWS lambda deployment of a NestJS project with route 53 domain?

How to setup AWS lambda deployment of a NestJS project with route 53 domain? I have a NestJS application. The app is basically stock created with nest new <app-name>. I've installed the @nestjs/...
jfkeci's user avatar
  • 1
0 votes
1 answer
32 views

AWS Lambda function for URL masking

I have a vanity URL that I want to redirect to a specific page in a website(Cloudfront Distribution). I can do a redirect with Masking from GoDaddy but it does not help me with https options for the ...
Deepanshu Narwat's user avatar
0 votes
0 answers
48 views

Evaluation of a boolean condition using a lambda expression, without storing it in a variable [closed]

I have this simple evaluation, inside of a loop: var messageDateOk = true; if (dateFrom != null && messageDate < dateFrom.Value) messageDateOk = false; if (dateTo != null && ...
while1's user avatar
  • 57
0 votes
2 answers
66 views

Need to find return type method's lambda function parameter

(Note.. I have restructured the example to more closely match the use case I am working on) I have the following interface defined: public interface Interceptor { <T> T intercept (Invocation&...
William Denton's user avatar
-1 votes
2 answers
60 views

C# Lambda Convert Comma Seperated Upper case string with spaces to Titlecase with Trim

I have a Comma separated Upper case string with spaces that needs to be converted into a comma separated string in Title Case and trim the end spaces only. Sample String: "BAHAMAS, BAHRAIN, BANGLADESH,...
Mufaddal's user avatar
  • 574
0 votes
1 answer
14 views

Lookup populated columns and get smallest number of another col

I am fairly experienced Excel formula user of filters and VLOOKUP's, but not sure how to combine the two things together in a formula. what is the lowest age of a specified fruit? Can I make a formula ...
H204fun's user avatar
0 votes
1 answer
41 views

Perform value validation with lambda expression

I need to perform validation that specific String is appearing in DevTools traffic (Selenium 4 / Java) I saw several examples like this: devTools.addListener(Network.responseReceived(), entry -> { ...
Prophet's user avatar
  • 32.5k
0 votes
1 answer
13 views

Facing Error Message when trying to send email notification to multiple people Using AWS Lambda, SNS, S3, SES

I want to design a system using AWS Lambda, S3, SNS, SES for an educational institution. In which whenever a subject teacher uploads her subject assignment in S3 bucket for a specific class and ...
raj's user avatar
  • 11
0 votes
1 answer
21 views

Proper way of importing multiple large dependencies in Lambda

I'm working on a project and want to use Lambda to run my code. The thing is I have a lot of dependencies and I'm not sure what the best way to run them is. For example, I use the hugging face ...
vel's user avatar
  • 91
0 votes
0 answers
31 views

Lambda Role not authorized to perform emr-containers:CreateVirtualCluster

Hello I am using lambda in terraform to deploy a cloudformation stack to create an EMR virtual cluster in our Kubernetes cluster. I am doing this as a workaround for having a terraform version lower ...
shxpark's user avatar
  • 297
0 votes
1 answer
61 views

sorted() and lambda function in python

My question is, I do not understand this lambda function to sort the xml document. It works, but I don't get it. The expression of the lambda is: (child.tag,child.get('volume')) and I don't get it. ...
Tunaz's user avatar
  • 1
0 votes
2 answers
48 views

How can I get the MethodInfo of Expression.Lambda<TDelegate>(Expression, ParameterExpression[])?

I'm trying to get the MethodInfo of the static Expression.Lambda<TDelegate>(Expression, ParameterExpression[]) method. But I'm getting an AmbiguousMatchException when I try with GetMetod: ...
0xced's user avatar
  • 25.3k
-1 votes
1 answer
70 views

Java compile-error Non-static method cannot be referenced from a static context

My code: public static void main(String[] args) { // ok get1(Student::getName); // error! why? get2(Student::getName); } public static <T, R> void get1(Function<T, R> fun) ...
Stephen Qu's user avatar
0 votes
1 answer
25 views

assigning value for column based on whether or not text is present

I have a data frame: Fruit Color apple 'is green' apple 'big and Green' apple 'is red' banana 'yellow" banana 'is yellow' banana 'is small and yellow" I want to make a third column, ...
sprc's user avatar
  • 31
0 votes
2 answers
52 views

List All IP addresses used in AWS account

I'm a newbie to both Stack Overflow and coding, so please bear with me if my question seems a bit basic or naive. I'm trying to figure out how to retrieve the complete list of IP addresses used in my ...
FlameBoy's user avatar
0 votes
1 answer
20 views

The issue is that I have tokenized my data in a pandas data frame but I when I attempt to remove stop words, it does not remove the stop words

from nltk.corpus import stopwords from nltk.tokenize import word_tokenize stop = stopwords.words('english') lyrical_data['lyrics'] = lyrical_data.apply( lambda x : nltk.word_tokenize(str(x['lyrics'])),...
Randolf Gabrielle Uy's user avatar
0 votes
2 answers
34 views

Converting java.util.Function to non-Lambda expression one in Monad example taken from Wikipedia

There is a very simple Monad example, written in Java, which is taken from Wikipedia article. import java.util.function.Function; interface Monad<T> { <U> Monad<U> bind(Function&...
toowren's user avatar
  • 85
0 votes
0 answers
19 views

Using On Premise data gateway in AWS

I want to extract data from SQL Anywhere to AWS s3 bucket. I have an 'on premise data gateway' running on a server that connects the SQL Anywhere. I'm curious to know if it's possible to pull this ...
Deeins's user avatar
  • 1
1 vote
0 answers
47 views

Can we pass a basic operator "<" as a callable argument? [duplicate]

My low-level routine needs a argument, to specify it should compare data with LessThan(<) or GreatThan(>) operator. Like this: using CompOp_f = std::function<bool( double, double )>; ...
Leon's user avatar
  • 1,501
-1 votes
1 answer
21 views

event_source_mapping for api_gateway in aws using terraform

I am facing an issue while trying to map api-gateway as an event source for lambda. I am getting the mentioned error " │ **Error: creating Lambda Event Source Mapping (arn:aws:apigateway:us-east-...
srinu chandra's user avatar
1 vote
1 answer
57 views

Need help converting a list comprehension to a lambda function

I am learning lambda functions and I came across a question which is actually meant to be solved using a list comprehension but I wanted to know if there is a way to do the same using lambda functions....
rpicoder's user avatar
0 votes
0 answers
10 views

lambda function query in pandas dataframe [duplicate]

How do I get this lambda function to work? I want to inspect the value in the 'work_year' column and if it is less than 2023 I want to multiply the 'salary_in_usd' figure by the inflation rate data in ...
adamc's user avatar
  • 1
0 votes
0 answers
27 views

how to change output of lambda function in filter + lambda?

I am a beginner in python and currently I am learning how lambda functions work. I want to know if there is a way for me to influence the output of a lambda + filter combo, because if I have ...
rpicoder's user avatar
1 vote
3 answers
36 views

Pandas Assign, Lambda, List Comprehension Question

I receive data as a list of dicts in a single column. Each list can be a different length. Sample data looks like this: df = pd.DataFrame( [ [[{'value': 1}, {'value': 2}, {'value': 3}]], ...
John Duffy's user avatar
0 votes
0 answers
19 views

NextJS SST Static pages problem: Why static page get "Miss from CloudFront"?

I'm testing NextJS hosting with SST, so I deploy a simple nextJS app that only renders this static page: // src/pages/index.tsx function Home() { return <h1>Hello</h1>; } export default ...
Vitor Figueredo Marques's user avatar
-1 votes
2 answers
63 views

Convert nested for loop to stream in java 11

Convert to Streams: private static List<Location> extractLocation(List<Location> locations){ List<Location> locationList = new ArrayList<>(); for(Location l : ...
nanosoft's user avatar
  • 2,933
0 votes
0 answers
19 views

Throwing a checked exception inside a lambda expression javaFX Button [duplicate]

I have a method that builds a JavaFX stage to call information from the user, to create a new object with their input. Because I want the same method to work for updating and for creating a new object,...
Shaun H's user avatar
0 votes
1 answer
30 views

Can we update iceberg table from AWS lambda function using Python API of Iceberg?

My AWS lambda generates a pandas Data Frame after some transformations in my data so I was just looking to update my iceberg table directly with this pandas Data Frame object by using Python Iceberg ...
Keshav Bajaj's user avatar
0 votes
1 answer
25 views

sometimes lambda.invoke doesn't trigger lambda call

I have a long running download task that is being performed by download-lambda function. download-lambda function gets executed from other lambda function code, let's call it calling-other-lambda ...
micronyks's user avatar
  • 54.9k
-1 votes
1 answer
64 views

lambda aws Unable to import module 'lambda_function': No module named 'requests' [duplicate]

i created a simple lambda function like calling api url and i have import requests library in my lambda function and i downloaded requests library in my local machine with command (pip3 install ...
Fazalulla's user avatar

1
2 3 4 5
597