0

event.body was an object but content-type is not json

"errorMessage": "event.body was an object but content-type is not json",
    "errorType": "Error",
    "stackTrace": [
        "Error: event.body was an object but content-type is not json",
    ]

trying to add a response header using lambda integration but getting the following error

- http:
          path: 'myPath'
          method: get
          cors: value
          integration: lambda
          request:
            passThrough: NEVER
            template:
              application/json: { "body" : $input.json('$') }
          response:
            headers:
              Strict-Transport-Security: "'max-age=31536000; includeSubDomains'"
John Rotenstein
  • 241,921
  • 22
  • 380
  • 470

0 Answers0