title: How to filter AWS Lambda and API Gateway logs in logstash for Elasticsearch service?
body: <p>I have AWS Lambda and API gateway logs in S3 bucket, i have hosted logstash and moving logs form s3 to elasticsearch service for centralise logging. I want to filter logs of Lambda and api gateway in logstash, so in elastic search i can find things easly.</p>
  
  <p>below is apigateway log that i am getting in kibana "message" field and want to filter</p>
  
  <pre><code>{"messageType":"DATA_MESSAGE",
  "owner":"",
  "logGroup":"API-Gateway-Execution-Logs/live",
  "logStream":"d645920e395fe","subscriptionFilters":["API-Gateway-Execution-Logslive"],
  "logEvents":[{"id":"3463","timestamp":1553,"message":"(d7b307ed-4c36-11e9) Extended Request Id: W6ghjgj"}]
  }
  
  filter i tried with
  filter {
      grok {
          match =&gt; { "message" =&gt; "%{GREEDYDATA:wd}" }
      }
      json{
          source =&gt; "wd"
          target =&gt; "js"
      }
      mutate {
          add_field =&gt; { "t1" =&gt; "%{[js][logEvents][message]}"}
      }
  }
  </code></pre>