Go to CloudWatch
→ Lambda Insights
→ Multi-Function
.
You can select the four Lambda functions which are created by our application and look at their metrics.
Under Lambda Insights
→ Single-Function
, we can see the individual function metrics like CPU, Memory and Network Usage.
Lambda Insights is integrated with ServiceLens. You can view x-ray traces by clicking on View
shown below for a particular function execution.
Rightsizing the Lambda Functions.
Looking at memory utilization for each of the Lambda functions-
We see that % utilization of memory is high.
Lets increase the memory allocated to each of the Lambda functions. You can do that using AWS Lambda Console or AWS CDK. The AWS CDK code changes will look like below:
status-update-services.ts
stepfn.ts
Change the two files and execute “cdk deploy” to push the changes to Lambda functions. We can see changes in Duration and Memory Usage (Max) metrics.