Luis  Rodrigues

Luis Rodrigues

1599814145

AWS Lambda — Enhance the Functionality With Lambda Layers

Back in Nov 20014, Lambda functions brought in a revolution in the world of cloud computing. That introduced us to serverless computing in the true sense. The concept of independent pieces of computation that are fast and easily affordable, provided a new paradigm.

Independent computing units were great. But soon, people realized that pieces of their code were really not independent. There was a lot that they needed to share. We need some common data structures, and utilities across the application. How do we provide them in Lambda functions?

That led to some duplication of code. People found innovative ways of working around this — by having a unified code in one place, that is configured to deploy into several different units. So the same code was deployed into different lambda functions. That did work to an extent. But then the deployment complexity blew up.

#serverless #aws #aws-lambda

What is GEEK

Buddha Community

AWS Lambda — Enhance the Functionality With Lambda Layers
Luna  Hermann

Luna Hermann

1594377780

Calling an AWS Lambda function from another Lambda function

In this article, I am going to explain how to create an AWS Lambda function and then call this function from another Lambda function within the same region. This is a useful scenario in which we may need to execute a second lambda function based on the outcome of some previous logic. Another scenario may be to execute a second lambda function several times by using different parameters.

For the sake of this article, we will consider a typical retailer application, in which we can purchase different products from a retailer site using a lambda function.

Architecture Diagram

Figure 1 – Architecture Diagram

If you consider the above architecture diagram, you can see that we have an AWS lambda function – the ParentFunction, which assumes a specific role from the IAM (Invoke Other Lambda Function) and then calls another lambda function – the ChildFunction with a payload. Once the execution of the ChildFunction is completed, it returns a response, which is then passed on to the ParentFunction. The ParentFunction receives the response and handles the job accordingly.

As in this example, let us assume that the ParentFunction is going to call the ChildFunction with a payload of ProductName, Quantity, and the UnitPrice of that product. The ChildFunction, in turn, will process this payload, calculate the total sales amount, generate a transaction reference ID, and return this information to the ParentFunction.

Creating the first AWS Lambda Function – ChildFunction

Let us first go ahead and create the ChildFunction, which will process the input payload and return the results to the ParentFunction.

#aws rds #functions #aws #lambda function

Ray  Patel

Ray Patel

1619510796

Lambda, Map, Filter functions in python

Welcome to my Blog, In this article, we will learn python lambda function, Map function, and filter function.

Lambda function in python: Lambda is a one line anonymous function and lambda takes any number of arguments but can only have one expression and python lambda syntax is

Syntax: x = lambda arguments : expression

Now i will show you some python lambda function examples:

#python #anonymous function python #filter function in python #lambda #lambda python 3 #map python #python filter #python filter lambda #python lambda #python lambda examples #python map

Gordon  Matlala

Gordon Matlala

1617875400

Adding Code to AWS Lambda, Lambda Layers, and Lambda Extensions Using Docker

2020 was a difficult year for all of us, and it was no different for engineering teams. Many software releases were postponed, and the industry slowed its development speed quite a bit.

But at least at AWS, some teams released updates out of the door at the end of the year. AWS Lambda received two significant improvements:

  • AWS Lambda Extensions; and
  • Support of Docker images for your functions.

With these two new features and Lambda Layers, we now have three ways to add code to Lambda that isn’t directly part of our Lambda function.

The question is now: when should we use what?

In this article, I try to shine some light on the Lambda Layers, Lambda Extensions, and Docker image for Lambda.

First things first. All these Lambda features can be used together. So if you think about where to put your code, at least your decisions aren’t mutually exclusive. You can upload a Docker image and attach a regular Lambda Layer and a Lambda Extension. The same is possible if your Lambda function is based on a ZIP archive.

What does this all mean? Keep reading and find out.

#aws #aws-lambda #serverless #devops #docker #lambda

Luis  Rodrigues

Luis Rodrigues

1599814145

AWS Lambda — Enhance the Functionality With Lambda Layers

Back in Nov 20014, Lambda functions brought in a revolution in the world of cloud computing. That introduced us to serverless computing in the true sense. The concept of independent pieces of computation that are fast and easily affordable, provided a new paradigm.

Independent computing units were great. But soon, people realized that pieces of their code were really not independent. There was a lot that they needed to share. We need some common data structures, and utilities across the application. How do we provide them in Lambda functions?

That led to some duplication of code. People found innovative ways of working around this — by having a unified code in one place, that is configured to deploy into several different units. So the same code was deployed into different lambda functions. That did work to an extent. But then the deployment complexity blew up.

#serverless #aws #aws-lambda

Cross-account access to invoke AWS lambda using AWS CDK

If you are here, you may have a pretty good knowledge of how to use AWS CDK for defining cloud infrastructure in code and provisioning it through AWS. So let’s get started on how to grant permission to your lambda function to access the resources in another AWS account.

Let’s say you have two accounts called Account A and Account B, and you need to give permission to lambda function in Account A (ex: 11111111)to access the resources in Account B(22222222). You can easily do this by assuming an IAM Role in Account B and then uses the returned credentials to invoke AWS resources in Account B.

#acces #account #aws #lambda #aws lambda #aws cdk