1626657086
DAY 48 - 100 Days Of AWS | Lambda Invoking functin
Lets have this 100DaysOfAWS challenge with me on Twitter and LinkedIn
Explore more on Day 48 learning
#aws
1621154520
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
1594821831
In this article, I will show you how to invoke a lambda function from another lambda function.
This invocation is most helpful in scenarios where you have layers or have common inputs to two functions, but they can’t be integrated, in such cases, we use the invoke method. Well, this is just one of the reasons, there are infinitely many reasons to use this based on your requirement.
For this, I have created two functions, **triggerLambdaFunction **and testFunction. While creating a Lambda function make sure you assign the IAM Role for Lambda, which has Policies of “AWSLambdaFullAccess” attached to it as shown below.
IAM Role to be used in lambda functions
The “testFunction” is the one we are going to trigger using another lambda function called “triggerLambdaFunction”. Both are created in the same way and here I’m using Node.js to write the functions.
Creating a new Lambda Function
In this triggerLambdaFunction, we have a FunctionCode window where we write our code to invoke another function using AWSLambda-invoke method which is defined in AWS.Lambda-class. So to use this method we should first import our AWS-SDK in the function. This is done to provide JavaScript objects for our AWS service.
#nodejs #lambda #aws #aws-lambda
1621000800
A month back AWS announced a preview of Lambda Extensions, a new way to easily integrate Lambda with your favorite monitoring, observability, security, and governance tools. Extensions can be published as Lambda layers, there are two types are extension:
#aws #aws-secrets-manager #lambda #aws lambda
1626657086
DAY 48 - 100 Days Of AWS | Lambda Invoking functin
Lets have this 100DaysOfAWS challenge with me on Twitter and LinkedIn
Explore more on Day 48 learning
#aws
1617875400
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:
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