概念 · 基于 SAA-C03
Auditing, logging and compliance for ML
CloudTrail answers who did what, Config answers whether a setting is compliant, and model documents show how a model was built.
本课尚未翻译,暂以英文显示。
你在Solutions Architect Associate中已学过
- CloudTrail records API activity. Management events are on by default, data events are off.
- An organization trail covers every account, and log file integrity validation proves logs were not changed.
- CloudTrail Lake has been closed to new customers since May 31, 2026.
Who called the API?
- CloudTrail
What was in the prompt?
- Bedrock invocation logs
Is the setting compliant?
- AWS Config rules
Where is personal data?
- Macie
How was the model built?
- Model Cards, lineage, Registry
| Question | Evidence |
|---|---|
| Who called the API? | CloudTrail |
| What was in the prompt? | Bedrock invocation logs |
| Is the setting compliant? | AWS Config rules |
| Where is personal data? | Macie |
| How was the model built? | Model Cards, lineage, Registry |
CreateEndpoint, CreateTrainingJob
- Type
- Management
- On by default
- Yes
InvokeModel, Converse
- Type
- Management
- On by default
- Yes
InvokeAgent, Retrieve
- Type
- Data
- On by default
- No
ApplyGuardrail
- Type
- Data
- On by default
- No
| Event | Type | On by default |
|---|---|---|
| CreateEndpoint, CreateTrainingJob | Management | Yes |
| InvokeModel, Converse | Management | Yes |
| InvokeAgent, Retrieve | Data | No |
| ApplyGuardrail | Data | No |
是什么
For SageMaker AI, control-plane calls such as CreateTrainingJob and CreateEndpoint are management events. For Amazon Bedrock, InvokeModel, InvokeModelWithResponseStream, Converse and ConverseStream are also management events, so a default trail already shows who called which model. Data events are off by default and cost extra: turn them on for Bedrock agent calls, Knowledge Base Retrieve calls, flows and guardrail evaluations (ApplyGuardrail). CloudTrail records who called and when, but not the prompt text. Model invocation logging records the prompts and answers, so use both.
是什么
AWS Config checks resource settings against rules and records changes. Managed rules cover ML settings, for example whether a SageMaker notebook instance or endpoint configuration uses a KMS key, or whether a notebook has direct internet access. Non-compliant resources can start a fix. Amazon Macie scans S3 buckets for personal data, so you know before it enters training.
是什么
Audit evidence for a model also comes from SageMaker AI itself. Model Cards record the intended use, training data and risk rating. Lineage tracking links data, training job, model and endpoint, so you can answer which data trained the model in production. Model Registry keeps the approval history. Set log retention on purpose: CloudWatch log groups keep logs forever by default, so set a retention period, and use S3 lifecycle rules and Object Lock for logs you must keep unchanged. Invocation logs hold prompts, so protect them as sensitive data.
要记住
- SageMaker control-plane calls are management events.
- Bedrock InvokeModel and Converse are management events. Agent, Knowledge Base and ApplyGuardrail calls are data events.
- CloudTrail shows who called. Invocation logs show what was sent.
- Config rules check encryption, VPC and internet settings.
- Model Cards, lineage and Registry history are audit evidence.
要记住
- Set retention. Macie finds personal data in S3.
考试中
- “Who invoked this Bedrock model last Tuesday?” points to CloudTrail.
- “Record every Knowledge Base query” points to CloudTrail data events for the knowledge base.
- “Flag notebooks without a KMS key” points to an AWS Config rule.
- “Show which data trained the deployed model” points to lineage tracking and Model Cards.
别和这些弄混
- CloudWatch generative AI observability and Bedrock metricsBedrock sends runtime metrics to CloudWatch on its own. Invocation logs need setup, and the dashboards read both.
- Troubleshooting ML security issuesWork out whether a failure is a permission or a network path, then read the error and the CloudTrail event.
- Encryption and data protection for MLEncrypt data at rest with KMS in each place ML touches it, encrypt traffic in transit, and keep secrets out of code.
本任务内容 · 4.3
- Scanning code and images in CI/CD
- Least privilege for ML artifacts
- IAM roles for SageMaker and ML workloads
- Bedrock access control
- Credential types for Bedrock
- Auditing, logging and compliance for ML
- Troubleshooting ML security issues
- Isolating ML systems with VPCs
- Encryption and data protection for ML
- AI and ML security risks
Guardrails