Need advice about which tool to choose?Ask the StackShare community!
AWS CloudTrail vs Elasticsearch: What are the differences?
Introduction
In this article, we will discuss the key differences between AWS CloudTrail and Elasticsearch. Both AWS CloudTrail and Elasticsearch are essential components of modern cloud computing and data analysis. However, they serve different purposes and offer distinct features and functionalities.
Logging and auditing capabilities: AWS CloudTrail focuses on providing a centralized logging and auditing solution for monitoring and tracking user activity across various AWS resources and services. It records API calls and events, providing a comprehensive audit trail for security analysis, troubleshooting, and compliance purposes. On the other hand, Elasticsearch is a powerful open-source search and analytics engine that enables real-time data exploration, analysis, and visualization across diverse data types and sources.
Managed vs. Open-source: AWS CloudTrail is a managed service provided by Amazon Web Services (AWS), meaning that AWS takes care of the infrastructure, maintenance, and scaling aspects of the service. Users only need to enable CloudTrail for their AWS accounts and can access the collected logs through the AWS Management Console or APIs. In contrast, Elasticsearch is an open-source software that can be installed and operated on-premises or in the cloud. Users have full control over the deployment and maintenance of Elasticsearch clusters.
Integration with AWS ecosystem: AWS CloudTrail is tightly integrated with other AWS services, allowing users to monitor and track API calls made to AWS resources such as Amazon S3, EC2, Lambda, etc. It provides comprehensive event history and metadata of these API calls for auditing and compliance purposes. Elasticsearch, although not limited to AWS, can be integrated with AWS services using various connectors and plugins. This enables users to index and analyze data from AWS sources in real-time.
Data storage and retention: With AWS CloudTrail, users do not need to worry about data storage, as the logs are automatically stored in an S3 bucket. Furthermore, users can specify the retention period and apply additional security measures such as encryption and access control. Elasticsearch, on the other hand, requires users to set up and manage their own storage infrastructure for indexing and storing data. This gives users greater flexibility in terms of storage capacity and cost optimization.
Search and analytics capabilities: While both AWS CloudTrail and Elasticsearch offer search capabilities, they differ in their approach and focus. AWS CloudTrail primarily focuses on providing search capabilities for auditing and compliance purposes. Users can search for specific API events and filter results based on various parameters. Elasticsearch, on the other hand, is a comprehensive search and analytics platform that supports advanced querying, filtering, and aggregation operations on large volumes of data. It provides powerful visualization tools for creating real-time dashboards and reports.
Scalability and performance: AWS CloudTrail scales automatically based on the user's AWS account usage. It can handle large volumes of API events and is designed to provide reliable and performant logging and auditing capabilities. Elasticsearch, being open-source, offers scalability and performance that can be tailored to specific requirements. Users can scale Elasticsearch clusters horizontally by adding more nodes to handle increased data volume and query load.
In summary, AWS CloudTrail and Elasticsearch are distinct services with different focuses. AWS CloudTrail provides centralized logging and auditing capabilities for monitoring user activity on AWS resources, while Elasticsearch is a powerful open-source search and analytics platform that enables real-time data exploration and analysis.
We would like to detect unusual config changes that can potentially cause production outage.
Such as, SecurityGroup new allow/deny rule, AuthZ policy change, Secret key/certificate rotation, IP subnet add/drop. The problem is the source of all of these activities is different, i.e., AWS IAM, Amazon EC2, internal prod services, envoy sidecar, etc.
Which of the technology would be best suitable to detect only IMP events (not all activity) from various sources all workload running on AWS and also Splunk Cloud?
For continuous monitoring and detecting unusual configuration changes, I would suggest you look into AWS Config.
AWS Config enables you to assess, audit, and evaluate the configurations of your AWS resources. Config continuously monitors and records your AWS resource configurations and allows you to automate the evaluation of recorded configurations against desired configurations. Here is a list of supported AWS resources types and resource relationships with AWS Config https://docs.aws.amazon.com/config/latest/developerguide/resource-config-reference.html
Also as of Nov, 2019 - AWS Config launches support for third-party resources. You can now publish the configuration of third-party resources, such as GitHub repositories, Microsoft Active Directory resources, or any on-premises server into AWS Config using the new API. Here is more detail: https://docs.aws.amazon.com/config/latest/developerguide/customresources.html
If you have multiple AWS Account in your organization and want to detect changes there: https://docs.aws.amazon.com/config/latest/developerguide/aggregate-data.html
Lastly, if you already use Splunk Cloud in your enterprise and are looking for a consolidated view then, AWS Config is supported by Splunk Cloud as per their documentation too. https://aws.amazon.com/marketplace/pp/Splunk-Inc-Splunk-Cloud/B06XK299KV https://aws.amazon.com/marketplace/pp/Splunk-Inc-Splunk-Cloud/B06XK299KV
While it won't detect events as they happen a good stop gap would be to define your infrastructure config using terraform. You can then periodically run the terraform config against your environment and alert if there are any changes.
Consider using a combination of Netflix Security Monkey and AWS Guard Duty.
You can achieve automated detection and alerting, as well as automated recovery based on policies with these tools.
For instance, you could detect SecurityGroup rule changes that allow unrestricted egress from EC2 instances and then revert those changes automatically.
It's unclear from your post whether you want to detect events within the Splunk Cloud infrastructure or if you want to detect events indicated in data going to Splunk using the Splunk capabilities. If the latter, then Splunk has extremely rich capabilities in their query language and integrated alerting functions. With Splunk you can also run arbitrary Python scripts in response to certain events, so what you can't analyze and alert on with native functionality or plugins, you could write code to achieve.
Well there are clear advantages of using either tools, it all boils down to what exactly are you trying to achieve with this i.e do you want to proactive monitoring or do you want debug an incident/issue. Splunk definitely is superior in terms of proactively monitoring your logs for unusal events, but getting the cloudtrail logs across to splunk would require some not so straight forward setup (Splunk has a blueprint for this setup which uses AWS kinesis/Firehose). Cloudtrail on the other had is available out of the box from AWS, the setup is quite simple and straight forward. But analysing the log could require you setup Glue crawlers and you might have to use AWS Athena to run SQL Like query.
Refer: https://docs.aws.amazon.com/athena/latest/ug/cloudtrail-logs.html
In my personal experience the cost/effort involved in setting up splunk is not worth it for smaller workloads, whereas the AWS Cloudtrail/Glue/Athena would be less expensive setup(comparatively).
Alternatively you could look at something like sumologic, which has better integration with cloudtrail as opposed to splunk. Hope that helps.
I'd recommend using CloudTrail, it helped me a lot. But depending on your situation I'd recommed building a custom solution(like aws amazon-ssm-agent) which on configuration change makes an API call and logs them in grafana or kibana.
Hey everybody! (1) I am developing an android application. I have data of around 3 million record (less than a TB). I want to save that data in the cloud. Which company provides the best cloud database services that would suit my scenario? It should be secured, long term useable, and provide better services. I decided to use Firebase Realtime database. Should I stick with Firebase or are there any other companies that provide a better service?
(2) I have the functionality of searching data in my app. Same data (less than a TB). Which search solution should I use in this case? I found Elasticsearch and Algolia search. It should be secure and fast. If any other company provides better services than these, please feel free to suggest them.
Thank you!
Hi Rana, good question! From my Firebase experience, 3 million records is not too big at all, as long as the cost is within reason for you. With Firebase you will be able to access the data from anywhere, including an android app, and implement fine-grained security with JSON rules. The real-time-ness works perfectly. As a fully managed database, Firebase really takes care of everything. The only thing to watch out for is if you need complex query patterns - Firestore (also in the Firebase family) can be a better fit there.
To answer question 2: the right answer will depend on what's most important to you. Algolia is like Firebase is that it is fully-managed, very easy to set up, and has great SDKs for Android. Algolia is really a full-stack search solution in this case, and it is easy to connect with your Firebase data. Bear in mind that Algolia does cost money, so you'll want to make sure the cost is okay for you, but you will save a lot of engineering time and never have to worry about scale. The search-as-you-type performance with Algolia is flawless, as that is a primary aspect of its design. Elasticsearch can store tons of data and has all the flexibility, is hosted for cheap by many cloud services, and has many users. If you haven't done a lot with search before, the learning curve is higher than Algolia for getting the results ranked properly, and there is another learning curve if you want to do the DevOps part yourself. Both are very good platforms for search, Algolia shines when buliding your app is the most important and you don't want to spend many engineering hours, Elasticsearch shines when you have a lot of data and don't mind learning how to run and optimize it.
Rana - we use Cloud Firestore at our startup. It handles many million records without any issues. It provides you the same set of features that the Firebase Realtime Database provides on top of the indexing and security trims. The only thing to watch out for is to make sure your Cloud Functions have proper exception handling and there are no infinite loop in the code. This will be too costly if not caught quickly.
For search; Algolia is a great option, but cost is a real consideration. Indexing large number of records can be cost prohibitive for most projects. Elasticsearch is a solid alternative, but requires a little additional work to configure and maintain if you want to self-host.
Hope this helps.
Pros of AWS CloudTrail
- Very easy setup7
- Good integrations with 3rd party tools3
- Very powerful2
- Backup to S32
Pros of Elasticsearch
- Powerful api329
- Great search engine315
- Open source231
- Restful214
- Near real-time search200
- Free98
- Search everything85
- Easy to get started54
- Analytics45
- Distributed26
- Fast search6
- More than a search engine5
- Awesome, great tool4
- Great docs4
- Highly Available3
- Easy to scale3
- Nosql DB2
- Document Store2
- Great customer support2
- Intuitive API2
- Reliable2
- Potato2
- Fast2
- Easy setup2
- Great piece of software2
- Open1
- Scalability1
- Not stable1
- Easy to get hot data1
- Github1
- Elaticsearch1
- Actively developing1
- Responsive maintainers on GitHub1
- Ecosystem1
- Community0
Sign up to add or upvote prosMake informed product decisions
Cons of AWS CloudTrail
Cons of Elasticsearch
- Resource hungry7
- Diffecult to get started6
- Expensive5
- Hard to keep stable at large scale4