Arkinu
AWS service comparison

AWS CloudTrail vs AWS Config: differences and when to use each

AWS CloudTrail
AWS Config

Often confused on the examQuestions tend to offer one as a distractor for the other: look for the phrase in the scenario that tips the balance.

Management and Governance

AWS CloudTrail

On the radar· CloudTrail Lake no longer accepts new customers

Service that records the actions taken by users, roles, and services in an AWS account as events, whether made from the console, the CLI, the SDKs, or the APIs. It answers who did what, on which resource, and when, for auditing, governance, and compliance.

Exam phrases that point here

  • «record which user made each API call, when, and from where»

    CloudTrail stores an event for every API call, made from the console, the CLI, or the SDKs, with who made it, what action, with what parameters, and what the service responded.

    When not: If the question asks how a resource was configured at each point in time or whether it complies with a rule, it is AWS Config. If it asks about CPU usage, latency, or application errors, it is Amazon CloudWatch.

  • «prove that audit records were not modified or deleted after delivery»

    CloudTrail log file integrity validation delivers signed digest files every hour with the hashes of the logs; with them you can check whether a file changed or disappeared.

    When not: Validation detects changes, it does not prevent them. If the requirement is to prevent anyone from deleting or overwriting the logs, it is combined with controls on the S3 bucket, such as MFA Delete, bucket policies, or S3 Object Lock.

  • «record the activity of all accounts in the organization in a single bucket»

    An organization trail, created from the management account or a delegated administrator, records the events of all member accounts and delivers them to a single S3 bucket; member accounts cannot modify it.

    When not: If what you want to centralize is the compliance status of the configuration, it is an AWS Config aggregator; if it is security findings from multiple services, AWS Security Hub CSPM.

  • «record who read or wrote objects in an S3 bucket or invoked a Lambda function»

    Those operations are CloudTrail data events: high-volume activity on the resources themselves, which you have to enable on the trail for the chosen resources.

    When not: Data events are not recorded by default and have a separate cost. A trail with the default configuration records only management events (creating, modifying, or deleting resources).

  • «detect an unusual volume of API calls»

    CloudTrail Insights learns the account's normal volume of calls and generates events when it deviates, for example because of a runaway script.

    When not: If the scenario talks about threats, such as compromised credentials or communication with malicious addresses, the clue points to Amazon GuardDuty, which analyzes CloudTrail among other sources.

  • «react immediately when someone performs a specific action in the account»

    With an active trail, API calls arrive as events on the default Amazon EventBridge event bus, where a rule can filter them and send a notification or take corrective action.

    When not: Read-only calls (Get, List, Describe) are not received by a normal rule: they require a special rule state. And if the change to watch for is the violation of a configuration rule, AWS Config with remediation is usually a better fit.

Often paired with

  • Amazon S3
  • Amazon CloudWatch
  • Amazon EventBridge
Study AWS CloudTrail →

Management and Governance

AWS Config

Service that records the configuration of AWS resources, their relationships, and how they have changed over time. Using rules, it evaluates whether resources comply with the desired configuration and flags those that are noncompliant.

Exam phrases that point here

  • «continuously assess whether resource configurations comply with company policies»

    AWS Config rules compare each resource's recorded configuration with the desired one and mark each resource as compliant or noncompliant, with its history.

    When not: Config detects, it does not prevent: if the requirement is that nobody can create the wrong resource, the clue points to preventive controls such as IAM policies, AWS Organizations SCPs, or AWS Service Catalog.

  • «view the configuration change history of a resource»

    Config records a configuration item every time a resource changes, with its relationships to other resources, and lets you view its timeline.

    When not: If the question is which user made the change and from where, that information comes from AWS CloudTrail; Config links each change to its CloudTrail event, but does not replace it.

  • «automatically fix resources that do not comply with a rule»

    A Config rule can have a remediation action associated with it, an AWS Systems Manager Automation document, which runs on its own on each noncompliant resource.

    When not: Remediation fixes after the change. If the question asks to react to a specific API call at the moment it happens, that can also be done with CloudTrail events in Amazon EventBridge.

  • «central view of compliance across all accounts and Regions»

    A Config aggregator collects the configuration and compliance data of many accounts and Regions in one account and one Region, including an entire organization.

    When not: The aggregator is read-only: it does not deploy rules to the accounts (for that, conformance packs or other tools such as CloudFormation StackSets). If the question asks to collect security findings from multiple services, the clue points to AWS Security Hub.

  • «inventory of AWS resources and how they relate to each other»

    Config maintains an inventory of supported resources with their current and historical configuration and the relationships between them.

    When not: If the question asks for the API call history it is CloudTrail; if it asks for an inventory of the software installed inside instances, AWS Systems Manager Inventory also appears.

Often paired with

  • Amazon S3
  • Amazon SNS
Study AWS Config →