pirixtech / techie-buddy

Techie buddy helps software developers and all desk workers to exercise in a busy day to maintain good posture and health
1 stars 0 forks source link

Test lambda response in console #8

Closed PXMYH closed 4 years ago

PXMYH commented 4 years ago

Test Event

{
  "version": "1.0",
  "session": {
    "new": true,
    "sessionId": "amzn1.echo-api.session.123456789012",
    "application": {
      "applicationId": "amzn1.ask.skill.987654321"
    },
    "user": {
      "userId": "amzn1.ask.account.testUser"
    },
    "attributes": {}
  },
  "context": {},
  "request": {
    "type": "Dialog.API.Invoked",
    "requestId": "amzn1.echo-api.request.1234",
    "timestamp": "2020-08-07T18:21:44Z",
    "locale": "en-US",
    "apiRequest": {
      "name": "GetExerciseRoutine",
      "arguments": {
        "area": "Example body area",
        "duration": 4,
        "limit": 1
      },
      "slots": {
        "BodyArea": {
          "type": "Simple",
          "value": "Example body area"
        }
      }
    }
  }
}

Test response

START RequestId: eb61e5d1-c246-4e38-a99d-56f8c7e1ff78 Version: $LATEST
2020-08-08T19:51:21.210Z    eb61e5d1-c246-4e38-a99d-56f8c7e1ff78    INFO    REQUEST ENVELOPE = {"version":"1.0","session":{"new":true,"sessionId":"amzn1.echo-api.session.123456789012","application":{"applicationId":"amzn1.ask.skill.987654321"},"user":{"userId":"amzn1.ask.account.testUser"},"attributes":{}},"context":{},"request":{"type":"Dialog.API.Invoked","requestId":"amzn1.echo-api.request.1234","timestamp":"2020-08-07T18:21:44Z","locale":"en-US","apiRequest":{"name":"GetExerciseRoutine","arguments":{"area":"Example body area","duration":4,"limit":1},"slots":{"BodyArea":{"type":"Simple","value":"Example body area"}}}}}
2020-08-08T19:51:21.240Z    eb61e5d1-c246-4e38-a99d-56f8c7e1ff78    INFO    handler input object = {"requestEnvelope":{"version":"1.0","session":{"new":true,"sessionId":"amzn1.echo-api.session.123456789012","application":{"applicationId":"amzn1.ask.skill.987654321"},"user":{"userId":"amzn1.ask.account.testUser"},"attributes":{}},"context":{},"request":{"type":"Dialog.API.Invoked","requestId":"amzn1.echo-api.request.1234","timestamp":"2020-08-07T18:21:44Z","locale":"en-US","apiRequest":{"name":"GetExerciseRoutine","arguments":{"area":"Example body area","duration":4,"limit":1},"slots":{"BodyArea":{"type":"Simple","value":"Example body area"}}}}},"context":{"callbackWaitsForEmptyEventLoop":true,"functionVersion":"$LATEST","functionName":"getExerciseRoutine","memoryLimitInMB":"128","logGroupName":"/aws/lambda/getExerciseRoutine","logStreamName":"2020/08/08/[$LATEST]22caaa80bc1e4251b4a7da54358dd633","invokedFunctionArn":"arn:aws:lambda:us-east-1:683778474338:function:getExerciseRoutine","awsRequestId":"eb61e5d1-c246-4e38-a99d-56f8c7e1ff78"},"attributesManager":{},"responseBuilder":{}}
2020-08-08T19:51:21.261Z    eb61e5d1-c246-4e38-a99d-56f8c7e1ff78    INFO    RESPONSE = {"apiResponse":{"id":"1c6e43d6-c149-4178-b52a-5f8f69539e35","name":"{bodyArea} exercise","duration":2,"exercise":"Sit on a mat in a cross-legged position. You can also sit on a chair\n                          with your feet flat on the floor. Make sure to keep your spine straight.\n                          Place your left palm on the top of your head and inhale. Now, slowly tilt\n                          your head to the left with exhalation. Here, you also need to apply gentle\n                          pressure with your palm to give a deeper stretch. Hold the position for\n                          30 seconds. Now, slowly lift your head up and release your hands. Repeat\n                          the same posture on the other side. You can do 4-5 sets."}}
END RequestId: eb61e5d1-c246-4e38-a99d-56f8c7e1ff78
REPORT RequestId: eb61e5d1-c246-4e38-a99d-56f8c7e1ff78  Duration: 73.17 ms  Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 72 MB  Init Duration: 177.04 ms