how can i monitor multiple lambda functions which are a part of microservice application?

I checked the CloudTrial’s Trial event for lambda invocation on my own API gateway with lambda. It has the form:

{
    "eventVersion": "1.07",
    "userIdentity": {
        "type": "AWSService",
        "invokedBy": "apigateway.amazonaws.com"
    },
    "eventTime": "2020-10-30T12:03:17Z",
    "eventSource": "lambda.amazonaws.com",
    "eventName": "Invoke",
    "awsRegion": "us-east-1",
    "sourceIPAddress": "apigateway.amazonaws.com",
    "userAgent": "apigateway.amazonaws.com",
    "requestParameters": {
        "xxxx": "arn:aws:lambda:us-east-1:xxxx:function:fff",
        "sourceArn": "arn:aws:execute-api:us-east-1:xxx:84j28c7zga/test/ANY/test"
    },
    "responseElements": null,
    "additionalEventData": {
        "functionVersion": "arn:aws:lambda:us-east-1:xxxx:function:fff:$LATEST"
    },
    "requestID": "bc5f574e-58d8-4a2b-978b-5ec32aba447e",
    "eventID": "2345b878-4998-4317-a0c4-1005df40d873",
    "readOnly": false,
    "resources": [
        {
            "accountId": "xxxx",
            "type": "AWS::Lambda::Function",
            "ARN": "arn:aws:lambda:us-east-1:xxx:function:fff"
        }
    ],
    "eventType": "AwsApiCall",
    "managementEvent": false,
    "recipientAccountId": "xxxx",
    "sharedEventID": "1906ed81-6835-4046-943d-f2ca9e5b9d40",
    "eventCategory": "Data"
}

As you can see above, when the lambda is invoked, you get information that it was API gateway which invoked it:

    "userIdentity": {
        "type": "AWSService",
        "invokedBy": "apigateway.amazonaws.com"
    },

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top