Could you please demonstrate aws lambda with python

0 votes
Jun 24, 2019 in AWS by Priyanka
660 views

1 answer to this question.

0 votes

Hey @Priyanka, 

Python Lambda functions are functions that do not have any name. They are also known as anonymous or nameless functions. The word ‘lambda’ is not a name, but its a keyword. This keyword specifies that the function that follows is anonymous.

A Lambda function is created using the lambda operator and its syntax is as follows:

SYNTAX:

lambda arguments: expression

Python lambda function can have any number of arguments but it takes just one expression. The inputs or arguments can start at 0 and go up to any limit. Just like any other functions, it’s perfectly fine to have lambda functions with no inputs. Therefore, you can have lambda functions in any of the following formats:

EXAMPLE:

lambda : “Specify the purpose”

Here, the lambda function is not taking any arguments.

EXAMPLE:

lambda a1: “Specify the use of a1“

Here, lambda is taking one input which is a1.

Similarly, you can have lambda a1, a2, a3..an.

Let’s take a few examples to demonstrate this:

EXAMPLE 1:

a = lambda x: x*x
print(a(3)

OUTPUT: 9

Have a look at this blog for detailed explanation: https://www.edureka.co/blog/python-lambda/

answered Jun 24, 2019 by Kalgi
• 52,360 points

Related Questions In AWS

+1 vote
10 answers
0 votes
1 answer

Using Shapely on AWS Lambda with Python 3

For some reason, the pip install of ...READ MORE

answered Oct 8, 2018 in AWS by Priyaj
• 58,090 points
2,607 views
0 votes
1 answer

Python Pusher in AWS Lambda

Using virtualenv to keep track of dependencies will be ...READ MORE

answered May 30, 2018 in AWS by Cloud gunner
• 4,670 points
1,011 views
0 votes
1 answer
0 votes
1 answer
+1 vote
1 answer
+13 votes
2 answers
+1 vote
1 answer

Hi could you plz help me on creating appspec file for code deploy .

Hi @Sri, you could use something like ...READ MORE

answered Dec 3, 2019 in AWS by Kalgi
• 52,360 points
1,352 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP