How to log X-Amzn-Request-id when invoking a lambda aws-sdk

0 votes

I see that when we invoke a lambda, there is an x-amzn-request-id for that execution:

  "resourceType": "lambda",
  "resource": "invoke",
  "output": {
    "ExecutedVersion": "$LATEST",
    "Payload": {
      "recordsReady": false
    },
    "SdkHttpMetadata": {
      "AllHttpHeaders": {
        "X-Amz-Executed-Version": [
          "$LATEST"
        ],
        "x-amzn-Remapped-Content-Length": [
          "0"
        ],
        "Connection": [
          "keep-alive"
        ],
        "x-amzn-RequestId": [ <-------------------
          "0b1198a6-2ed8-485b-b5f6-6c086ff192a1"
        ],

How would we log out that request id from the lambda using aws-sdk? Is it even possible?

Jan 19, 2023 in AWS by Tejashwini
• 3,820 points

edited 5 days ago 10 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP