# I want to import aws cloudtrail eventTime through logstash

**URL:** <https://discuss.elastic.co/t/i-want-to-import-aws-cloudtrail-eventtime-through-logstash/271479>\
**Category:** Logstash\
**Created:** [April 28, 2021, 7:47am UTC](https://discuss.elastic.co/t/i-want-to-import-aws-cloudtrail-eventtime-through-logstash/271479 "2021-04-28T07:47:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![loanshark](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/loanshark/32/87826_2.png) [@loanshark](https://discuss.elastic.co/u/loanshark)\
**Post date:** [April 28, 2021, 7:47am UTC](https://discuss.elastic.co/t/i-want-to-import-aws-cloudtrail-eventtime-through-logstash/271479/1 "2021-04-28T07:47:57Z")

</div>

I want to import aws cloudtrail eventTime through logstash. Works well but fails to get eventTime.

**my logstash.conf**

```auto
input {
  s3 {
    bucket => "xxxxx"
    prefix => "xxxxx"
    sincedb_path => "/etc/logstash/sincedb/cloudtrail"
    temporary_directory => "/etc/logstash/tmp"
    region => "xxxxx"
    type => "cloudtrail"
    codec => "cloudtrail"
  }
}

filter {
  if [type] == "cloudtrail" {
    mutate {
      gsub => ["eventSource", "\.amazonaws\.com$", ""]
    }

    if [eventSource] == "elasticloadbalancing" and [eventName] == "describeInstanceHealth" and [userIdentity.userName] == "secret_username" {
      drop {}
    }
  }

  date {
      match => ["eventTime", "ISO8601"]
  }
}

```

In Kibana, other tables can be checked, but eventTime cannot be found.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 26, 2021, 7:47am UTC](https://discuss.elastic.co/t/i-want-to-import-aws-cloudtrail-eventtime-through-logstash/271479/2 "2021-05-26T07:47:59Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
