Course menuAIP-C01

Exams / AIP-C01 / Study guide / Audit logging and source traceability (invocation logging, CloudTrail, Data Catalog)

Audit logging and source traceability (invocation logging, CloudTrail, Data Catalog): AIP-C01 study notes and practice questions

What to know about Audit logging and source traceability (invocation logging, CloudTrail, Data Catalog) for the AIP-C01 exam, from the AI Safety, Security, and Governance domain (20% of the exam guide), then 1 free question to test it. Part of the AIP-C01 study guide.

Last verified against current AWS documentation ·How we write our questions

What to know for the exam

AIP-C01 asks how to prove later what a generative system did. Auditors want the identity behind each call, the content of each exchange, the sources behind each answer, and proof that the records were not altered. Each need maps to a different service, so the exam tests whether you can pick the one that answers the specific question.

Model invocation logging

Model invocation logging is off by default. When you turn it on, Bedrock writes request and response content, token counts and metadata to CloudWatch Logs, to Amazon S3, or to both. Choose S3 for long retention and lower cost, and apply KMS encryption and restricted access to the destination. See model invocation logging.

CloudTrail

CloudTrail records API calls with the caller identity, time and source address, for example an InvokeModel call or a change to a guardrail. It does not record prompt or response content, so use it alongside invocation logs, not in place of them.

Source records

The Glue Data Catalog registers data sources, schemas and locations, so you can show where a document set came from and when it was crawled. Knowledge base metadata files add source attributes, such as department or document date, to each chunk.

Source attribution in answers

RetrieveAndGenerate returns citations that link each part of the answer to the source chunks. Store the citations with the response record. Without that link, an audit can show what the model returned but not which document supported it.

Immutable retention

S3 Object Lock prevents objects from being deleted or overwritten for a set retention period. Compliance mode prevents changes even by the root user, which suits regulated logs. Set retention to match the policy that applies to the data. See S3 Object Lock.

Decision logs

For regulated decisions, write one record per decision that holds the input reference, the model and prompt versions, the retrieved sources, the guardrail result, the output and any human reviewer. This record answers “why did the system decide this” without rebuilding it later.

How to choose

Scenario wording Choose
“Record every prompt and response for audit” Model invocation logging to S3
“Which identity called which model, and when” CloudTrail
“Prove which document an answer came from” Stored citations, plus Glue Data Catalog source records
“Logs must not be altered or deleted early” S3 Object Lock in compliance mode
“Reconstruct a regulated decision later” Decision log with model, prompt and source versions

Common traps

  • Assuming invocation logging is on. It is off until you enable it.
  • Using CloudTrail as the prompt log. It holds API calls, not content.
  • Storing audit logs in a bucket that engineers can delete from without a retention lock.
  • Writing unmasked personal data into the audit trail. Audit logs also need data protection.
  • Keeping citations out of the stored response, so the source link is lost after the session.

Try the 1 practice question

A credit union uses Amazon Bedrock models in three applications: a card dispute assistant, a branch advisor tool and a collections email drafter. A member has complained about something they were told, and the compliance team must find exactly what the model received and returned.

Regulators require the credit union to keep each prompt and each response for seven years, encrypted, and to search them by member account. The team wants the complete content of every model call, including calls from applications it has not yet built.

The records must be inexpensive to keep for seven years and queryable with standard SQL when a complaint arrives. The team should not need to change every application.

Which solution meets these requirements at the LOWEST long-term cost?

Choose one answer.

  1. A. Turn on AWS CloudTrail for the account, keep its records for seven years in an encrypted S3 bucket, and query the logs with Amazon Athena whenever a complaint is received.
  2. B. Turn on model invocation logging for Amazon Bedrock with text data delivered to an encrypted S3 bucket that has a seven-year lifecycle rule, and query the stored records with Amazon Athena.
  3. C. Write each prompt and response from the three applications to Amazon CloudWatch Logs with a three-day retention setting, and export the logs to a data warehouse once a month for the compliance team.
  4. D. Use AWS Config to record every configuration change to the Bedrock resources, and keep that configuration history for seven years in an encrypted S3 bucket for the compliance team.
Show the answer and explanation

Answer: B

  • A. Wrong: CloudTrail records who called the Bedrock API and when, but it does not record the prompt or response text, so the compliance team could not see what the model said. The logs answer who-and-when questions, not what-was-said questions. Learn more: Monitor Amazon Bedrock API calls using CloudTrail (opens in a new tab)
  • B. Right: Invocation logging captures the prompt and response text for each model call in the account and Region, so no application changes are needed. An S3 bucket with a lifecycle rule keeps seven years of records inexpensively, and Athena searches them with SQL. Learn more: Monitor model invocation using CloudWatch Logs and Amazon S3 (opens in a new tab)
  • C. Wrong: A three-day retention setting deletes records long before the seven-year requirement, and each application would need changes to write them. A monthly export also leaves recent calls out of the record.
  • D. Wrong: AWS Config records the configuration of resources such as guardrails and endpoints, not the content of each model call. The credit union needs the prompts and responses themselves, which this history does not contain.

Explanation

Model invocation logging is an account-level setting that stores the text of each prompt and response, so applications need no changes. An encrypted S3 bucket with a seven-year lifecycle rule keeps storage inexpensive, and Athena queries the records with SQL. CloudTrail and AWS Config record calls and configuration rather than content, and short log retention loses the records.

Study

Want more on Audit logging and source traceability (invocation logging, CloudTrail, Data Catalog)? The 5 full-length practice sets have 5 more Audit logging and source traceability (invocation logging, CloudTrail, Data Catalog) questions, 375 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets

Study Audit logging and source traceability (invocation logging, CloudTrail, Data Catalog)

More AI Safety, Security, and Governance topics