概念 · 基于 SAA-C03
Encryption and data protection for ML
Encrypt data at rest with KMS in each place ML touches it, encrypt traffic in transit, and keep secrets out of code.
本课尚未翻译,暂以英文显示。
你在Solutions Architect Associate中已学过
- KMS creates and controls encryption keys, and logs every use in CloudTrail.
- A key policy is required, and IAM works only if the key policy allows it.
- Keys can be customer managed, AWS managed or AWS owned.
Training data in S3
- Protect with
- SSE-KMS
- Setting
- Bucket default encryption
Training instance storage
- Protect with
- KMS key
- Setting
- Volume KMS key
Model artifacts
- Protect with
- KMS key
- Setting
- Output KMS key
Endpoint instance storage
- Protect with
- KMS key
- Setting
- Endpoint config key
Traffic between nodes
- Protect with
- Encryption
- Setting
- Inter-container encryption
Credentials
- Protect with
- Secrets Manager
- Setting
- Fetch at run time
| Data | Protect with | Setting |
|---|---|---|
| Training data in S3 | SSE-KMS | Bucket default encryption |
| Training instance storage | KMS key | Volume KMS key |
| Model artifacts | KMS key | Output KMS key |
| Endpoint instance storage | KMS key | Endpoint config key |
| Traffic between nodes | Encryption | Inter-container encryption |
| Credentials | Secrets Manager | Fetch at run time |
1 / 2
Training data in S3
- Protect with
- SSE-KMS
- Setting
- Bucket default encryption
Training instance storage
- Protect with
- KMS key
- Setting
- Volume KMS key
Model artifacts
- Protect with
- KMS key
- Setting
- Output KMS key
| Data | Protect with | Setting |
|---|---|---|
| Training data in S3 | SSE-KMS | Bucket default encryption |
| Training instance storage | KMS key | Volume KMS key |
| Model artifacts | KMS key | Output KMS key |
2 / 2
Endpoint instance storage
- Protect with
- KMS key
- Setting
- Endpoint config key
Traffic between nodes
- Protect with
- Encryption
- Setting
- Inter-container encryption
Credentials
- Protect with
- Secrets Manager
- Setting
- Fetch at run time
| Data | Protect with | Setting |
|---|---|---|
| Endpoint instance storage | KMS key | Endpoint config key |
| Traffic between nodes | Encryption | Inter-container encryption |
| Credentials | Secrets Manager | Fetch at run time |
是什么
ML data rests in several places, and each has its own key setting. S3 buckets that hold training data and models use SSE-KMS. A training job takes a volume KMS key for the storage attached to its instances, and an output KMS key for the model artifacts it writes. An endpoint configuration takes a KMS key for the storage volume of the endpoint instances. Studio storage and Bedrock customization output can also use your own key. Choose a customer managed key when you need control over who can use it, rotation and audit.
是什么
In transit, SageMaker AI and Bedrock APIs use TLS. Enforce it on buckets with a Deny when aws:SecureTransport is false. Distributed training sends data between containers, and the option EnableInterContainerTrafficEncryption encrypts it, at the price of longer training time.
Secrets such as database passwords or third-party API keys belong in AWS Secrets Manager. Code reads them at run time with its role, and rotation changes them without a deploy. Do not put them in notebooks, environment variables or the image. For sensitive data in the data itself, Amazon Macie scans S3 buckets for personal data and reports findings, and you then mask or remove it before training.
要记住
- S3: SSE-KMS for data and models.
- Training: volume key and output key. Endpoint config: key for the instance volume.
- Customer managed keys for control, rotation and audit.
- TLS in transit. Deny aws:SecureTransport false.
- Inter-container traffic encryption for distributed training: slower.
要记住
- Secrets Manager for credentials. Macie for personal data.
考试中
- “Encrypt the storage attached to training instances” points to the volume KMS key on the training job.
- “Encrypt traffic between nodes of a distributed job” points to inter-container traffic encryption.
- “Database password used by a training script” points to AWS Secrets Manager.
- “Find personal data in the training bucket” points to Amazon Macie.
别和这些弄混
- Least privilege for ML artifactsGive each role the smallest S3 prefix, key, registry and data permission it needs, and use tags to scale the rules.
- Auditing, logging and compliance for MLCloudTrail answers who did what, Config answers whether a setting is compliant, and model documents show how a model was built.
- Isolating ML systems with VPCsRun ML in private subnets, reach AWS services through endpoints, and turn on network isolation where code must not call out.
本任务内容 · 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