{
  "_meta": {
    "documentation": "https://www.elastic.co/guide/en/ecs/current/ecs-base.html",
    "ecs_version": "1.12.2"
  },
  "template": {
    "mappings": {
      "properties": {
        "aws": {
          "properties": {
            "cloudtrail": {
              "properties": {
                "additional_eventdata": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "api_version": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "console_login": {
                  "properties": {
                    "additional_eventdata": {
                      "properties": {
                        "login_to": {
                          "ignore_above": 1024,
                          "type": "keyword"
                        },
                        "mfa_used": {
                          "type": "boolean"
                        },
                        "mobile_version": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                },
                "digest": {
                  "properties": {
                    "end_time": {
                      "type": "date"
                    },
                    "log_files": {
                      "type": "nested"
                    },
                    "newest_event_time": {
                      "type": "date"
                    },
                    "oldest_event_time": {
                      "type": "date"
                    },
                    "previous_hash_algorithm": {
                      "ignore_above": 1024,
                      "type": "keyword"
                    },
                    "previous_s3_bucket": {
                      "ignore_above": 1024,
                      "type": "keyword"
                    },
                    "public_key_fingerprint": {
                      "ignore_above": 1024,
                      "type": "keyword"
                    },
                    "s3_bucket": {
                      "ignore_above": 1024,
                      "type": "keyword"
                    },
                    "s3_object": {
                      "ignore_above": 1024,
                      "type": "keyword"
                    },
                    "signature_algorithm": {
                      "ignore_above": 1024,
                      "type": "keyword"
                    },
                    "start_time": {
                      "type": "date"
                    }
                  }
                },
                "error_code": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "error_message": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "event_category": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "event_type": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "event_version": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "flattened": {
                  "properties": {
                    "additional_eventdata": {
                      "type": "flattened"
                    },
                    "request_parameters": {
                      "type": "flattened"
                    },
                    "response_elements": {
                      "type": "flattened"
                    },
                    "service_event_details": {
                      "type": "flattened"
                    }
                  }
                },
                "insight_details": {
                  "type": "flattened"
                },
                "management_event": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "read_only": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "recipient_account_id": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "request_id": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "request_parameters": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "resources": {
                  "properties": {
                    "account_id": {
                      "ignore_above": 1024,
                      "type": "keyword"
                    },
                    "arn": {
                      "ignore_above": 1024,
                      "type": "keyword"
                    },
                    "type": {
                      "ignore_above": 1024,
                      "type": "keyword"
                    }
                  }
                },
                "response_elements": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "service_event_details": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "shared_event_id": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "user_identity": {
                  "properties": {
                    "access_key_id": {
                      "ignore_above": 1024,
                      "type": "keyword"
                    },
                    "arn": {
                      "ignore_above": 1024,
                      "type": "keyword"
                    },
                    "invoked_by": {
                      "ignore_above": 1024,
                      "type": "keyword"
                    },
                    "session_context": {
                      "properties": {
                        "creation_date": {
                          "type": "date"
                        },
                        "mfa_authenticated": {
                          "ignore_above": 1024,
                          "type": "keyword"
                        },
                        "session_issuer": {
                          "properties": {
                            "account_id": {
                              "ignore_above": 1024,
                              "type": "keyword"
                            },
                            "arn": {
                              "ignore_above": 1024,
                              "type": "keyword"
                            },
                            "principal_id": {
                              "ignore_above": 1024,
                              "type": "keyword"
                            },
                            "type": {
                              "ignore_above": 1024,
                              "type": "keyword"
                            }
                          }
                        }
                      }
                    },
                    "type": {
                      "ignore_above": 1024,
                      "type": "keyword"
                    }
                  }
                },
                "vpc_endpoint_id": {
                  "ignore_above": 1024,
                  "type": "keyword"
                }
              }
            },
            "cloudwatch": {
              "properties": {
                "message": {
                  "norms": false,
                  "type": "text"
                }
              }
            },
            "ec2": {
              "properties": {
                "ip_address": {
                  "ignore_above": 1024,
                  "type": "keyword"
                }
              }
            },
            "elb": {
              "properties": {
                "action_executed": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "backend": {
                  "properties": {
                    "http": {
                      "properties": {
                        "response": {
                          "properties": {
                            "status_code": {
                              "ignore_above": 1024,
                              "type": "keyword"
                            }
                          }
                        }
                      }
                    },
                    "ip": {
                      "ignore_above": 1024,
                      "type": "keyword"
                    },
                    "port": {
                      "ignore_above": 1024,
                      "type": "keyword"
                    }
                  }
                },
                "backend_processing_time": {
                  "properties": {
                    "sec": {
                      "type": "float"
                    }
                  }
                },
                "chosen_cert": {
                  "properties": {
                    "arn": {
                      "ignore_above": 1024,
                      "type": "keyword"
                    },
                    "serial": {
                      "ignore_above": 1024,
                      "type": "keyword"
                    }
                  }
                },
                "classification": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "classification_reason": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "connection_time": {
                  "properties": {
                    "ms": {
                      "type": "long"
                    }
                  }
                },
                "error": {
                  "properties": {
                    "reason": {
                      "ignore_above": 1024,
                      "type": "keyword"
                    }
                  }
                },
                "incoming_tls_alert": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "listener": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "matched_rule_priority": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "name": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "protocol": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "redirect_url": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "request_processing_time": {
                  "properties": {
                    "sec": {
                      "type": "float"
                    }
                  }
                },
                "response_processing_time": {
                  "properties": {
                    "sec": {
                      "type": "float"
                    }
                  }
                },
                "ssl_cipher": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "ssl_protocol": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "target_group": {
                  "properties": {
                    "arn": {
                      "ignore_above": 1024,
                      "type": "keyword"
                    }
                  }
                },
                "target_port": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "target_status_code": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "tls_handshake_time": {
                  "properties": {
                    "ms": {
                      "type": "long"
                    }
                  }
                },
                "tls_named_group": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "trace_id": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "type": {
                  "ignore_above": 1024,
                  "type": "keyword"
                }
              }
            },
            "s3access": {
              "properties": {
                "authentication_type": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "bucket": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "bucket_owner": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "bytes_sent": {
                  "type": "long"
                },
                "cipher_suite": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "error_code": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "host_header": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "host_id": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "http_status": {
                  "type": "long"
                },
                "key": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "object_size": {
                  "type": "long"
                },
                "operation": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "referrer": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "remote_ip": {
                  "type": "ip"
                },
                "request_id": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "request_uri": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "requester": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "signature_version": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "tls_version": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "total_time": {
                  "type": "long"
                },
                "turn_around_time": {
                  "type": "long"
                },
                "user_agent": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "version_id": {
                  "ignore_above": 1024,
                  "type": "keyword"
                }
              }
            },
            "vpcflow": {
              "properties": {
                "account_id": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "action": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "instance_id": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "interface_id": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "log_status": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "pkt_dstaddr": {
                  "type": "ip"
                },
                "pkt_srcaddr": {
                  "type": "ip"
                },
                "subnet_id": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "tcp_flags": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "tcp_flags_array": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "type": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "version": {
                  "ignore_above": 1024,
                  "type": "keyword"
                },
                "vpc_id": {
                  "ignore_above": 1024,
                  "type": "keyword"
                }
              }
            }
          }
        }
      }
    }
  }
}