AWS CloudTrail vs AWS Config

Need advice about which tool to choose?Ask the StackShare community!

AWS CloudTrail

291
277
+ 1
14
AWS Config

55
98
+ 1
6
Add tool

AWS CloudTrail vs AWS Config: What are the differences?

Introduction:

AWS CloudTrail and AWS Config are both services provided by Amazon Web Services (AWS) that help organizations in managing and auditing their AWS resources. While they have some similarities and overlap in functionality, there are several key differences between the two services.

  1. Data Collection: AWS CloudTrail focuses on auditing and monitoring AWS API activity. It captures detailed information about API calls made within an AWS account, including who made the call, when it was made, and which resources were affected. This data is essential for security and compliance purposes, as it provides an audit trail of all API activity within an AWS environment. On the other hand, AWS Config focuses on recording the configuration history of AWS resources. It captures the configuration details of each resource and maintains a timeline of all configuration changes. This enables users to assess and audit the state of their AWS resources at any point in time.

  2. Scope of Monitoring: AWS CloudTrail provides a comprehensive and centralized view of API activity across an entire AWS account. It captures API calls made to various AWS services, including EC2, S3, IAM, and RDS, among others. In contrast, AWS Config provides resource-level monitoring, focusing on the configuration of individual AWS resources rather than API activity. It records configuration changes made to resources like EC2 instances, security groups, and S3 buckets, allowing users to track and manage resource-level changes specifically.

  3. Real-Time Monitoring: AWS CloudTrail provides real-time monitoring capabilities, allowing users to receive near real-time notifications of API activity. This enables organizations to respond quickly to any suspicious or unauthorized activity within their AWS infrastructure. AWS Config, on the other hand, primarily operates on a periodic basis (typically every few minutes) to capture the configuration state of resources. It can also be triggered by specific events such as configuration changes or periodic snapshots, but it does not offer continuous, real-time monitoring capabilities like AWS CloudTrail.

  4. Integration with Other AWS Services: AWS CloudTrail integrates with several other AWS services, such as AWS CloudWatch, AWS EventBridge, and AWS Lambda. This integration allows users to analyze and respond to CloudTrail events in real-time, triggering automated actions or alerts based on specific conditions. AWS Config also provides integration capabilities with services like AWS CloudWatch, which can be used to monitor the configuration changes captured by AWS Config. However, the level of integration is more focused on monitoring and analysis rather than triggering real-time actions based on specific events.

  5. Retention Period: AWS CloudTrail has a default retention period of 90 days for log files, which can be extended up to 365 days. This ensures that the API activity logs are available for a significant period, allowing organizations to meet their compliance and auditing requirements. On the other hand, AWS Config has a default retention period of 7 days for configuration history, which can be increased up to 7 years. While both services provide options for extended retention periods, their default and maximum retention periods differ significantly.

  6. Cost and Pricing Model: AWS CloudTrail incurs charges based on the volume of API events recorded, the number of trails configured, and any data events captured. Pricing for AWS Config, on the other hand, is based on the number of AWS resources recorded and the number of configuration snapshots taken. Comparing the cost of the two services can be subjective depending on factors such as the size of the environment, the volume of API activity, and the complexity of resource configurations.

**In Summary, AWS CloudTrail focuses on auditing and monitoring AWS API activity in real-time, while AWS Config records the configuration history of AWS resources to enable assessment and auditing of resource-level changes. CloudTrail provides a comprehensive view of API activity across an AWS account, while Config focuses on resource-level monitoring. CloudTrail has real-time monitoring capabilities, while Config operates more on a periodic basis. Both services integrate with other AWS services but with different levels of functionality. CloudTrail has a longer default retention period for log files, while Config offers a longer default retention period for configuration history. Finally, the cost and pricing models of the two services vary based on different factors.

Advice on AWS CloudTrail and AWS Config
Jigar Shah
Security Software Engineer at Pinterest · | 8 upvotes · 143.2K views

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?

See more
Replies (5)
Nati Abebe
Recommends
on
AWS ConfigAWS Config

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

See more
Isaac Povey
Casual Software Engineer at Skedulo · | 6 upvotes · 68.9K views
Recommends
on
TerraformTerraform

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.

See more
Matthew Rothstein
Recommends
on
Security MonkeySecurity Monkey

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.

See more
Vijayanand Narayanasharma
DevOps/TechOps Consultant at Qantas Loyalty · | 3 upvotes · 60K views
Recommends
on
AWS CloudTrailAWS CloudTrail

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.

See more
Recommends
on
AWS CloudTrailAWS CloudTrail

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.

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of AWS CloudTrail
Pros of AWS Config
  • 7
    Very easy setup
  • 3
    Good integrations with 3rd party tools
  • 2
    Very powerful
  • 2
    Backup to S3
  • 4
    Backed by Amazon
  • 2
    One stop solution

Sign up to add or upvote prosMake informed product decisions

Cons of AWS CloudTrail
Cons of AWS Config
    Be the first to leave a con
    • 2
      Not user friendly

    Sign up to add or upvote consMake informed product decisions

    What is AWS CloudTrail?

    With CloudTrail, you can get a history of AWS API calls for your account, including API calls made via the AWS Management Console, AWS SDKs, command line tools, and higher-level AWS services (such as AWS CloudFormation). The AWS API call history produced by CloudTrail enables security analysis, resource change tracking, and compliance auditing. The recorded information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by the AWS service.

    What is AWS Config?

    AWS Config is a fully managed service that provides you with an AWS resource inventory, configuration history, and configuration change notifications to enable security and governance. With AWS Config you can discover existing AWS resources, export a complete inventory of your AWS resources with all configuration details, and determine how a resource was configured at any point in time. These capabilities enable compliance auditing, security analysis, resource change tracking, and troubleshooting.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use AWS CloudTrail?
    What companies use AWS Config?
    See which teams inside your own company are using AWS CloudTrail or AWS Config.
    Sign up for StackShare EnterpriseLearn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with AWS CloudTrail?
    What tools integrate with AWS Config?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    What are some alternatives to AWS CloudTrail and AWS Config?
    AWS X-Ray
    It helps developers analyze and debug production, distributed applications, such as those built using a microservices architecture. With this, you can understand how your application and its underlying services are performing to identify and troubleshoot the root cause of performance issues and errors. It provides an end-to-end view of requests as they travel through your application, and shows a map of your application’s underlying components.
    Splunk
    It provides the leading platform for Operational Intelligence. Customers use it to search, monitor, analyze and visualize machine data.
    Logstash
    Logstash is a tool for managing events and logs. You can use it to collect logs, parse them, and store them for later use (like, for searching). If you store them in Elasticsearch, you can view and analyze them with Kibana.
    SLF4J
    It is a simple Logging Facade for Java (SLF4J) serves as a simple facade or abstraction for various logging frameworks allowing the end user to plug in the desired logging framework at deployment time.
    Logback
    It is intended as a successor to the popular log4j project. It is divided into three modules, logback-core, logback-classic and logback-access. The logback-core module lays the groundwork for the other two modules, logback-classic natively implements the SLF4J API so that you can readily switch back and forth between logback and other logging frameworks and logback-access module integrates with Servlet containers, such as Tomcat and Jetty, to provide HTTP-access log functionality.
    See all alternatives