Keep inference identities, data and audit evidence scoped
A service retrieves approved documents and invokes a model through a workload role.
Keep inference identities, data and audit evidence scoped
A service retrieves approved documents and invokes a model through a workload role. Treat document text as data. Give each component the smallest set of actions and resources it requires, and preserve evidence that privileged actions were authorized.
At 3:07:31 the instructor distinguishes problems in training inputs from malicious instructions in documents. Enforce data provenance at training time and authorization at the application boundary.
Work through the decision
An uploaded document asks the assistant to access a restricted report. Where must enforcement occur before any data is returned?
Check your reasoning
Treat the document as untrusted content. Enforce the caller’s permissions at retrieval and at the tool boundary; allow only approved resource scopes. Record the authorization decision without copying private document text into routine logs.
Continue in the recording · 2:57:38 · 3:04:38.
Decisions and tradeoffs
- Scoped execution role
- Limit each workload identity to its necessary actions, model resources and data locations.
- Private network path
- Configure appropriate VPC endpoints, DNS, policies and security groups when a service must keep supported traffic off public routes.
- KMS key permissions and encryption
- Encrypt artifacts with approved keys and grant the necessary decrypt or encrypt permissions to the intended service identities.
- CloudTrail audit events
- Inspect configured AWS API audit events to identify the principal, time and action on supported resources.
- Image and dependency scanning gate
- Inspect build artifacts for known vulnerabilities and block policy violations before promotion.
- Bedrock Guardrails with independent authorization
- Apply configured input and output safeguards alongside application authorization and approved tool scopes.
- Restricted logging and redaction
- Keep sensitive request content out of routine logs and limit access, encryption and retention for approved audit data.
Practice each guide skill
The numbers below follow the AWS task and skill identifiers.
- Scan dependencies and images before publication, record findings against the build digest and reject releases outside policy.
- Grant a workload access to the exact artifact location and necessary key operations. Test the least-privileged identity.
- Separate the training role, invocation role and release approver. Review resource and condition scope for each.
- Use CloudTrail events for supported API changes, Config for configuration history and restricted logs for workload diagnostics.
- For an authorized call that fails, trace identity, resource policy, key policy and endpoint policy without widening all roles.
- Place private workloads in the intended subnets and restrict traffic to approved peers and API endpoints.
- Treat external documents as untrusted. Enforce authorization outside the model, preserve provenance and validate permitted actions.
- Use temporary workload-role credentials where supported. If an API key is required, apply its documented scope, lifetime and rotation policy.
- Apply appropriate Bedrock Guardrails and protect sensitive text before persistent logging. Test outcomes with benign synthetic policy examples.
Official objectives for this lesson
Related lesson · Construct an audit trail that answers who did what
Keep inference identities, data and audit evidence scoped quiz
Answer 3 questions. Check each answer for an explanation.