"Nobody can tell who deleted that server." In an AWS account, somebody almost always can. Every action in AWS is an API call, whether it comes from a click in the console, a CLI command or a script, and AWS CloudTrail records those calls: who made the request, what they asked for, when, and from which IP address. The question is not whether the record exists, but how long you keep it and whether you're capturing the right events.
What CloudTrail records
CloudTrail logs activity from the AWS Management Console, the AWS CLI, the SDKs and calls that other AWS services make on your behalf. Each event includes the identity behind it (an IAM user, an assumed role, the root user or a service), the action, the time, the source IP address and the request parameters.
There are several kinds of events:
- Management events: operations on resources, such as launching or terminating an instance, changing a security group or creating an IAM role. Logged by default.
- Data events: operations inside a resource, such as reading or writing an S3 object or invoking a Lambda function. High volume, not logged by default, and charged extra when you turn them on.
- Network activity events and Insights events (unusual spikes in API activity) are also opt-in.
Event history vs trails
From the day an account is created, Event history gives you a searchable, downloadable record of the past 90 days of management events in each Region. That is enough to answer "who deleted that server yesterday?".
For anything longer, or for data events, create a trail. A trail delivers log files to an S3 bucket you choose, and a trail created in the console applies to all Regions by default. In AWS Organizations you can create an organization trail that covers every account. Teams that want to query events with SQL can also use CloudTrail Lake event data stores, with retention you choose.
Protect the evidence
Logs only help if nobody can quietly change them. Common mistakes are leaving the log bucket writable by the same people the logs are meant to watch, or keeping it in the account being audited. Better practice:
- Send logs to a separate, locked-down account and restrict who can delete or overwrite objects.
- Turn on log file integrity validation, so you can prove whether a log file was modified or deleted after delivery.
- Encrypt the logs with KMS and alert on attempts to stop logging.
Where AI fits
Model calls are API calls too. In Amazon Bedrock, InvokeModel, InvokeModelWithResponseStream, Converse and ConverseStream are logged as management events, so they appear in CloudTrail by default: which identity called which model, when and from where. Streaming calls add a completion event that carries the input and output token counts. Other Bedrock operations, such as invoking agents or querying knowledge bases, are data events you have to enable.
What CloudTrail does not hold is the prompt and response text. If you need that for auditing or debugging, turn on Bedrock's separate model invocation logging to CloudWatch Logs or S3, and treat those logs as sensitive data.
Quick recap
- CloudTrail records who did what, when and from where for API calls in your account.
- 90 days of management events are there by default; a trail to S3 keeps more.
- Data events are opt-in and cost extra; protect logs with a separate account and log file validation.
- Bedrock model calls are logged by default; prompts need model invocation logging.