A example project to create an elasticsearch and a subscription filter to get logs inside the CloudWatch and send to lambda. The lambda will send the data to elasticsearch. I'm using the following services:
- ElasticSearch
- CloudWatch
- Lambda
First of all, clone the repository.
- Installation process
- You need to install terraform. See docs.
To deploy to AWS, you need to use some commands inside folder src:
- terraform init
- terraform plan (It will show what will be happen when you run the command apply)
- terraform apply (This apply the configuration)
- It's possible to access the data and do querys (SQL)
- Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-sql.html
- Inside the panel Kibana, access the tool Dev Tools, it will show a console.
- Search the index: GET /_cat/indices?v
- To delete, use the command: DELETE /INDEX_NAME_TO_DELETE