Search code examples
amazon-web-servicesaws-lambdaaws-xray

What is the different between AWS::LAMBDA and AWS::LAMBDA::FUNCTION in xray?


I enable labmda xray on AWS and I am able to see the service map on xray console. But what I don't understand is the different between AWS::LAMBDA and AWS::LAMBDA::FUNCTION. If you look at below screenshot, you will see that my lambda requestTransactionhandler show in two section. One is AWS:Lambda the other is AWS::Lambda::Function. Each of them have a different latency. What is the different between them?

And there are 2 seconds more latency on AWS::Lambda so how can I improve it?

enter image description here


Solution

  • X-ray divides the function in two parts

    1. Functions's startup overhead represented with AWS::Lambda
    2. Functions's execution time represented with AWS::Lambda::Function

    These two parts of function are the two subsegments created by XRay.