Coding  Life

Coding Life

1628570274

Create an AWS Lambda Function with CDK in Javascript

In this video, We walk you through the steps to create an AWS Lambda function using CDK. I walk you through the process of initializing your application, creating your stack, and deploying it to AWS using CDK.

Prerequisites: 
1) AWS CLI - https://youtu.be/jCHOsMPbcV0 
2) CDK - https://youtu.be/I2cXlYYoQqQ 

Code: https://github.com/beabetterdevv/CDKLambda 

#aws #lambda #javascript 

 

What is GEEK

Buddha Community

Create an AWS Lambda Function with CDK in Javascript

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

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

Coding  Life

Coding Life

1628570274

Create an AWS Lambda Function with CDK in Javascript

In this video, We walk you through the steps to create an AWS Lambda function using CDK. I walk you through the process of initializing your application, creating your stack, and deploying it to AWS using CDK.

Prerequisites: 
1) AWS CLI - https://youtu.be/jCHOsMPbcV0 
2) CDK - https://youtu.be/I2cXlYYoQqQ 

Code: https://github.com/beabetterdevv/CDKLambda 

#aws #lambda #javascript 

 

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

Alycia  Klein

Alycia Klein

1590895500

Combine AWS Step Functions with CloudWatch Events using aws-cdk

AWS Step Functions allow one to execute & coordinate long-running processes. Step Functions fall into serverless AWS services, and the platform manages the function execution state completely.
In the example below we will use the following AWS services:
The example demonstrates how Step Functions manage execution of a process, which involves external events e.g. human interaction.

#workflow #aws-step-functions #aws-cdk #aws-lambda