AWS AI Services
Architecture before services. Find the layer that owns the problem. Each cluster keeps related tiles beside one if this → choose that tree. Open a service tile for its role, payload/workflow, capacity options, and AWS references. Interactive diagrams sit within their related sections.
What are you trying to minimize?
-
Operating effort
Prefer managed capabilities when their controls fit.
-
Application changes
Keep a compatible client/API boundary; change behind it.
-
Development effort
Use supported features and integrations before custom code.
First meet latency, scale, residency, security, and availability requirements. Then compare what your team must operate, change, or build.
1. Model lifecycle
Select → customize → evaluate → release → monitor
As-is or customize? Evaluate the unchanged baseline first.
What is actually missing?
-
Instructions, format, examples
Prompt engineering
Bedrock Prompt Management
Bedrock Prompt Optimization
-
Current/private facts + citations
Retrieve authorized evidence (RAG)
Bedrock Knowledge Bases
-
Stable behavior or style
Supported fine-tuning / LoRA
Bedrock
SageMaker AI
-
Broad domain language
Eligible continued pre-training on unlabelled data
Bedrock
SageMaker AI
-
Smaller model, measured task quality
Supported distillation; evaluate the student
Bedrock
SageMaker AI
-
Messy / mixed-format inputs
Extract → normalize → reformat if needed
Bedrock Data Automation
Textract
Comprehend
Lambda
Start with the unchanged model as a baseline, then prompt → RAG → justified customization. Tuning is not a source-refresh pipeline; quantization is a separate compression technique.
Both host; choose by the control you need.
Which control matters?
-
Managed model APIs
Supported base, customized, or imported models
Bedrock
-
GPU / container / endpoint control
Choose the serving mode
SageMaker AI
Which delivery pattern?
-
Interactive
Real-time endpoint
-
Large / long queued request
Asynchronous Inference
-
Intermittent CPU inference
Serverless; no GPU, even with Provisioned Concurrency
-
Dataset offline
Batch Transform
-
Interactive
-
Device compilation
Check supported hardware targets
SageMaker Neo
-
Local infrastructure / host control
Trace every dependency and data location
Outposts / Wavelength
Both Bedrock and SageMaker host models. The fork is the control you need. Open a card for capacity, GPU, and billing comparisons.
Approved ≠ deployed; retain a compatible rollback.
What changes?
-
Build and promote a release
Automate checks and deployment
CodePipeline / CodeBuild
-
Approved model version
Register evidence; deploy and verify separately
Model Registry
-
Runtime setting / feature flag
Validate, roll out, monitor, roll back
AppConfig
-
Read a stored value
Parameter tiers / throughput are separate choices
Parameter Store
-
Credential with rotation
Use Secrets Manager
KMS / Secrets Manager
-
Resource compliance
Record/evaluate resource configuration
Config
Approved ≠ deployed. Retain a compatible rollback and evaluate the actual application route.
2. Knowledge / data flow
Source → preprocess → ingest → store → retrieve
A catalogue describes data; ingestion builds search evidence.
Which responsibility?
-
Source documents / artifacts
Version objects and preserve lineage
S3
-
ETL, catalogue, quality rules
Validate or quarantine before indexing
Glue
-
ML preparation / processing
Visual transformations or processing jobs
Data Wrangler / Processing
A Data Catalog describes data; it is not the vector index. Source updates still need ingestion.
Preserve meaning and structure before chunking.
What is the input?
-
PDF / scan
Text, forms, tables, queries, expense/ID APIs
Textract
-
Semantic business fields / media
Supported output or custom blueprint
Bedrock Data Automation
-
Audio
Transcribe; distinguish speakers from recorded channels
Transcribe
-
Image / video
Supported visual analysis
Rekognition
-
Text entities, sentiment, PII
General NLP; apply any required redaction
Comprehend
-
Clinical entities / PHI
Supported medical APIs
Comprehend Medical
Readable is not always faithful: preserve tables, meaning, and source references before chunking.
Document → parse → chunk → metadata → embed → index.
Which preparation decision?
-
Managed ingestion / retrieval
Choose the supported KB and source contract
Bedrock Knowledge Bases
-
Chunk boundaries / overlap / parents
Compare five strategiesChunking strategies ↓
-
Document/query representation
Use compatible embedding models and versions
Bedrock embedding models
Ingestion: parse → chunk → metadata → embed → index. Retrieval and reranking happen for each query.
Choose by search needs, relationships, consistency, and cost.
What does the workload need?
-
Lexical/vector/hybrid search controls
Evaluate index, ranking, and capacity options
OpenSearch Service
-
Vectors + relational transactions
Supported PostgreSQL/pgvector integration
Aurora / RDS pgvector
-
Vector storage/query economics
Check filters, connectors, and measured latency
S3 Vectors
-
Relationships / multi-hop evidence
Supported graph retrieval/analytics
Neptune Analytics / GraphRAG
-
Existing enterprise search
Check eligibility, ACL sync, and connectors
Kendra
Benchmark recall, latency, filtering, synchronization, and total cost. There is no universal vector-count cutoff.
Find the first broken stage before changing the model.
Is the right evidence in Retrieve results?
-
No: recall miss
Source → extraction → sync → chunks → embeddings → trusted filters
Bedrock Knowledge Bases
Bedrock embedding models Chunking strategies ↓
-
Yes, but buried
Measure reranking and context selection
Bedrock reranking
-
Exact IDs / multi-part questions
Test supported hybrid search or decomposition
OpenSearch Service
Bedrock Knowledge Bases
-
Stale / unauthorized results
Fix metadata, sync, deletion, and user scope
S3
Bedrock Knowledge Bases
-
Correct context, wrong answer
Inspect prompt, model behavior, output cap, evaluation
Bedrock Prompt Management
Bedrock Evaluations
A reranker cannot recover an absent candidate. Fix retrieval before attributing every failure to the model.
RAG chunking strategies
Choose a sample document, then compare how each strategy preserves its meaning. Article and News use the same body text, with and without headings.
- Precision
- Baseline to evaluate
- Context
- Sentence boundaries preserved
- Cost
- Low setup effort
- Complexity
- Managed default
The service decides the grouping; do not assume sentence preservation also keeps every rule and exception together.
- Precision
- Smaller units can focus matches
- Context
- Overlap carries boundary text
- Cost
- More overlap duplicates indexed tokens
- Complexity
- Size + overlap configuration
Repeated word IDs mark the same content in adjacent chunks. This demo uses word windows and retained heading boundaries; AWS uses tokens and may preserve additional parsed document boundaries.
- Precision
- Topic-focused units may help
- Context
- Meaning boundaries guide splits
- Cost
- Additional semantic processing
- Complexity
- Tune and measure boundaries
Semantic splits can still separate a rule from a distant exception. They do not guarantee preservation of document hierarchy.
- Precision
- Child match narrows the search
- Context
- Parent includes its child content
- Cost
- Larger returned context uses tokens
- Complexity
- Two levels + overlap
The parent encloses the child content. Standard hierarchical KB retrieval can substitute parents and collapse several child hits into fewer results; GraphRAG has a different contract.
- Precision
- Domain-specific evidence units
- Context
- Keep related clauses together
- Cost
- Custom processing + operations
- Complexity
- Implement and maintain Lambda
For custom chunking, use the supported no-chunking configuration and Lambda/intermediate-S3 contract. Managed embedding/indexing can remain in place.
Measure retrieval and answer quality on your corpus; no strategy wins every trade-off. Metadata can be enriched at several preparation steps. New chunking requires re-ingestion; a reranker only sees its retrieved candidates. AWS chunking contract · Lambda transformations.
3. Runtime / inference flow
User/API → retrieval → prompt/context → model → response
Match the transport to the client exchange.
Which exchange?
-
One incremental response
Supported REST API streaming integration + model events
API Gateway
Converse / ConverseStream
-
Bidirectional / push later
WebSocket; manage connection and job state
API Gateway
-
GraphQL subscriptions
Use the configured subscription/auth contract
AppSync
For API Gateway, response streaming is REST-only. HTTP APIs do not provide that feature; check the whole transport path.
Management stores versions; optimization proposes revisions.
Which job?
-
Templates, variables, versions
Prompt Management
Bedrock Prompt Management
-
Model-specific rewrite / optimization
Evaluate the proposed candidate before release
Bedrock Prompt Optimization
Versioning and optimization do not themselves approve a production release.
Shared versus native request; evaluate sampling changes.
What needs attention?
-
Shared message format
Converse / ConverseStream
Converse / ConverseStream
-
Provider-native body
InvokeModel / streaming
InvokeModel / streaming
-
Inconsistent / repetitive output
Tune supported sampling on representative tasks
Inference parameters
-
Cut off mid-answer
Inspect stopReason and the output-token limit
Converse / ConverseStream
Inference parameters
-
Input exceeds context
Select evidence or split/synthesize; parameters cannot enlarge it
Bedrock Knowledge Bases
-
Too long / expensive
Concise format, tested output cap, context pruning
Inference parameters
Bedrock reranking
No universal temperature/top-p preset guarantees quality. Check model-specific fields and token limits.
The model only sees state you pass.
What does the application need?
-
Session / job / idempotency state
Persist scoped records and enforce expiry
DynamoDB
-
Fixed intents and slots
Build the supported bot interaction
Lex
-
Text → speech
Choose a supported voice engine
Polly
These can compose. The model only receives the conversation state you include in the request.
Cache what repeats; route by measured difficulty.
What repeats?
-
Long shared prefix
Prompt caching
Prompt / response caching
-
Interchangeable authorized answers
Exact/semantic application cache with versioned keys
Prompt / response caching
-
Public shared responses
Use a deliberate CDN cache policy
CloudFront
-
Mixed easy/hard requests
Supported managed routing, or a tested custom cascade
Intelligent Prompt Routing
-
Too much retrieved context
Rerank/select evidence and measure loss
Bedrock reranking
Cache keys and hits must respect tenant permissions, source versions, model/prompt configuration, and deletion.
Reserve, spread, or stay on-demand within policy.
Traffic and processing location?
-
Low / variable live demand
Supported on-demand inference
Bedrock
-
Sustained eligible demand
Compare reserved service tier and Provisioned Throughput
Provisioned Throughput
Bedrock
-
Burst capacity across approved Regions
Supported geographic/global profile; approve every destination
Cross-Region inference
-
Exactly one Region
Verify the regional model path and all dependencies
Bedrock
-
Delay-tolerant offline dataset
Supported batch job, separate from one async invocation
Bedrock
SageMaker AI
Capacity, service tiers, routing profiles, and streaming are different choices. Reservations can incur idle/commitment charges.
Response delivery and model capacity are different.
Where is time or capacity lost?
-
Slow first useful output
Measure retrieval, model time-to-first-token, transport buffering
OpenTelemetry / X-Ray
Converse / ConverseStream
-
Cold start
Check warm model and compute capacity separately
SageMaker AI
Lambda
-
Independent stages in sequence
Parallelize safely within quotas
Step Functions
-
Bursts exceed capacity
Pace work; review concurrency, tokens, quotas, capacity
SQS / SNS
Provisioned Throughput
Streaming improves incremental delivery; it does not by itself add model throughput.
4. Pillar · Orchestration
Who chooses the next step? State · retries · approvals
Known states, model-selected actions, or one bounded handler.
Is the path known in advance?
-
Known states / approvals / long waits
Step Functions Standard; callbacks and eligible .sync jobs
Step Functions
-
Short, high-volume workflow
Express ≤5 minutes; no callback tokens/.sync
Step Functions
-
Visual GenAI pipeline
Supported nodes and deterministic conditions
Bedrock Flows
-
Model selects actions / specialists
Bound the agent loop, authority, and iterations
Bedrock AgentCore
Strands / Agent Squad
-
One bounded handler
Externalize durable state
Lambda
-
Existing Classic agent
Check existing-customer and migration guidance
Bedrock Agents Classic
Express allows Wait states within its five-minute limit. External writes still need safe retry/idempotency behavior.
React, schedule, and buffer; retain workflow state separately.
What arrives?
-
S3 event → supported direct target
Configure notifications for Lambda, SNS, or standard SQS
EventBridge / S3 events
-
Filter / fan-out / start workflow
S3 EventBridge delivery + rule + supported target
EventBridge / S3 events
-
Bursty model/index work
Queue + paced consumers, visibility timeout, DLQ
SQS / SNS
-
Ordered business steps / waits
Use a workflow controller
Step Functions
Direct S3 notifications do not target Step Functions or SQS FIFO. A delivered event is not proof that downstream work succeeded.
Code + identity + bounded tools.
What do you already have?
-
Supported API / Lambda tools
Evaluate Gateway adapters before building a server
Bedrock AgentCore
MCP tool integration
-
Compatible agent / MCP server code
Evaluate Runtime hosting
Bedrock AgentCore
-
Agent inbound/outbound credentials
Configure supported trust and credential flows
AgentCore Identity
-
Custom execution/state needs
Choose a suitable runtime and own its operations
Lambda
Runtime hosts; Gateway connects; MCP standardizes tool interaction. The target still authorizes each action.
Retry ≠ re-plan ≠ circuit breaker; make side effects safe.
Which failure?
-
Transient failure / throttling
Bound retries with backoff, deadlines, idempotency
Step Functions
-
Sustained dependency failure
Circuit breaker + explicitly permitted fallback/degradation
DynamoDB
-
Runaway agent work
Bound iterations, tool authority, tokens, time
Bedrock AgentCore
Step Functions
-
Candidate release regresses
Halt promotion or roll back a compatible approved version
Model Registry
AppConfig
Retry, agent re-planning, circuit breaking, and rollback solve different failures.
5. Pillar · Security / governance
Identity · access · isolation · content safety
App users, workforce users, workloads, and agents.
Who or what needs access?
-
Customers / SaaS / mobile users
User-pool sign-in/federation → JWT → application authorization
Cognito
-
Employees accessing AWS
Corporate IdP → Identity Center → assigned role/permission set
IAM Identity Center
-
External workload
Trusted OIDC assertion → STS → temporary role credentials
STS
-
AWS-native workload
IAM role → SDK temporary credentials → AWS API
IAM / Organizations SCPs
-
AI agent
Check inbound caller trust and outbound tool credentials
AgentCore Identity
Cognito, workforce SSO, and OIDC can compose. Choose by principal, target, trust, and authorization needs.
AWS API permission and record entitlement are separate.
Which access question?
-
May this principal assume the role?
Role trust + supported federation checks
STS
IAM / Organizations SCPs
-
May this AWS session call the API?
Identity/resource/session policies and guardrails
IAM / Organizations SCPs
-
May this user read the record / act?
Application/business policy; enforce the result
Verified Permissions
-
Who could access, or what is unused?
Configured analysis and policy checks
IAM Access Analyzer
A JWT is not an AWS access key. Temporary AWS credentials normally sign AWS requests with SigV4. SCPs and permission boundaries limit permissions; they do not grant them.
Configure connectivity and permission at their own boundaries.
Which requirement?
-
Private route to a supported service
Correct endpoint, DNS, and network rules
VPC endpoints / PrivateLink
-
Restrict who/where may call
Applicable IAM, resource, endpoint, and organizational policies
IAM / Organizations SCPs
The pipe and the permission are separate. An endpoint policy does not grant access or automatically close every other path.
Keys, lake permissions, retention, HTTP protection, sensitive data.
What must be protected?
-
Encryption key / stored credential
KMS / Secrets Manager
KMS / Secrets Manager
-
Integrated lake/table/row/column access
Lake Formation; prevent bypass paths
Lake Formation
-
Immutability / expiry
Object Lock / Lifecycle; include derived copies
S3 Object Lock / Lifecycle
-
Supported HTTP abuse
WAF rules and selected managed protections
WAF
-
Sensitive data in S3
Discover eligible objects; sanitize separately
Macie
Data discovery, retention, network protection, and authorization address different obligations.
Filter content; authorize documents and tools separately.
What must be controlled?
-
Supported model-content risks
Selected Guardrails policies; handle block/mask results
Bedrock Guardrails
-
Which document/tool is permitted
Enforce application and AWS permissions
Verified Permissions
IAM / Organizations SCPs
Guardrails does not authorize access. Treat retrieved/tool content as untrusted and validate proposed actions outside the model.
Authentication decision tree
Start with the principal, target resource, trust relationship, and required access. These paths can compose: A + E for user sign-in with document rules; D + F for an AWS-hosted agent using tool credentials.
Use a user pool when application sign-in and supported identity federation fit the product.
- User / provider1User / external IdPCustomers; optional Entra ID, Okta, OIDC or SAML federationSign-in / federated assertion
- AWS identity service2Cognito user poolAuthenticates the user; issues tokensID token → client; access token → API
- Customer application3Application / APIValidates signature, issuer, client/audience, expiry and token useTrusted principal + action + resource
- Customer policy4App authorizationCode or Verified Permissions decides; application enforces
Configure the app client, trusted external IdPs, redirects and API token validation before accepting sign-ins.
User-pool JWTs: ID token for the client sign-in; access token for the configured API. Neither is an AWS access key.
- An employee can also be an application user. Their corporate IdP can federate into Cognito; caller category alone does not forbid Cognito.
- Need direct access to AWS APIs? A configured Cognito identity pool can exchange supported identity tokens for temporary IAM-role credentials; then use SigV4.
- The backend often uses its own workload role for AWS calls. Its S3 permission does not decide which document the end user may read.
References: User pools · Identity pools.
Use Identity Center for centrally assigned workforce SSO and AWS account access.
- Workforce1EmployeeDeveloper or administratorCorporate sign-in
- Enterprise provider2Corporate IdPEntra ID, Okta, or a supported AD/federation setupSAML 2.0 assertion
- AWS workforce access3IAM Identity CenterValidates federation; applies user/group assignmentsAssigned account + permission set
- Target AWS account4Account role sessionPermission set provisions the IAM role/policiesTemporary credentials → SigV4
- Target resource5AWS account / APIApplicable IAM policies and guardrails decide access
Configure SAML trust and provision users/groups (SCIM or supported provisioning). Assign permission sets to accounts separately.
Portal/CLI sign-in enables an assigned account role session. AWS API calls use temporary credentials; SAML assertions are not S3 bearer tokens.
- SAML handles federation; SCIM handles user/group provisioning. Provisioning alone is not sign-in.
- A permission set templates IAM policies for account roles. It does not implement document-level rules in your custom assistant.
- Active Directory needs a supported directory integration or federation service; a raw AD password is not an OIDC token.
References: External IdPs · Permission sets.
Use supported OIDC federation when a workload can obtain an assertion from an explicitly trusted issuer.
- External compute1External workloadJob, service account, or automationRequest workload assertion
- Trusted external issuer2OIDC providerIssues a signed job/service-account JWTOIDC JWT
- AWS federation boundary3AWS STS + role trustAssumeRoleWithWebIdentity validates issuer/claims and trustAccess key ID + secret + session token
- Workload process4SDK role sessionUses expiring AWS credentialsSigV4-signed API request
- AWS resource5AWS APIRole/resource policies and guardrails apply
Create the IAM OIDC provider and a role trust policy scoped to the intended audience and subject, such as repository/branch or service account.
The JWT is the federation assertion. STS returns temporary AWS credentials with an expiration; the SDK uses them to sign requests.
- Gate 1: may this principal assume this role? Gate 2: may that role session perform this resource action? Passing the first does not pass the second.
- AssumeRoleWithWebIdentity is the OIDC/web-identity operation. Direct IAM SAML federation uses AssumeRoleWithSAML.
- Kubernetes federation depends on the deployment. EKS Pod Identity uses a different native credential path; not every pod uses web-identity federation.
References: IAM OIDC trust · STS credentials.
Use service-integrated role credentials instead of shipping long-lived keys to the workload.
- AWS compute1AWS workloadLambda, EC2 instance, or ECS taskService-integrated role assumption
- AWS IAM / STS2Trusted IAM roleExecution role, instance profile role, or task roleRotating temporary credentials
- Workload process3SDK credential chainRetrieves provided credentials; SDK handles signingSigV4-signed request
- Target resource4AWS APIAuthorizes role session, action, resource and context
Configure the service trust policy and attach the correct execution role, EC2 instance profile, or ECS task role. Grant only required permissions.
Temporary role credentials, not an end-user JWT. Let supported SDK credential providers obtain and refresh them.
- The ECS task role is for application calls; the task execution role supports tasks such as pulling images and delivering logs.
- A role is a permission-bearing identity, not a permanent access key. Trust allows assumption; permissions govern resulting actions.
References: Roles for AWS services · Request signing.
Use application policy, optionally Verified Permissions, when access depends on business entities and context.
- Trusted identity input1Authenticated identityValidated token/session establishes the principalPrincipal + requested action/resource
- Enforcement point2Application / APIDerives tenant and trusted resource contextAuthorization request
- Application policy store3Verified PermissionsCedar policies evaluate supported entities/contextALLOW / DENY decision
- Customer application4App enforcementStops denied calls; applies permitted scopeAuthorized filter / business API call
- Tenant data / business system5Document / actionRetrieval and action APIs enforce the scope
Define the Cedar schema/policies, trusted identity source and resource attributes. Keep AWS role permissions and application policies distinct.
A principal/action/resource/context request, or supported identity-source token via IsAuthorizedWithToken. An ALLOW is a decision, not AWS credentials.
- Verified Permissions does not perform user sign-in. Its token-based APIs can validate supported identity-source tokens while evaluating policy.
- The application is the policy enforcement point: deny on failed authorization and prevent direct retrieval or tool paths that bypass it.
- RAG must enforce tenant/document scope before context assembly. A backend IAM role that can query the KB does not imply every user may see every chunk.
References: Verified Permissions · Token identity sources.
Use AgentCore identity capabilities to connect supported inbound authentication and outbound credential needs.
- Caller identity1Caller / IdPSupported IdP authenticates user or machineJWT bearer; IAM/SigV4 alternative
- Agent ingress2Runtime / GatewayConfigured inbound authorizer checks trust and claimsAuthorized invocation context
- Agent execution3Agent workloadProposes an allowed tool callAuthorized credential request
- Credential broker / vault4AgentCore IdentitySupported OAuth/API-key credential accessScoped downstream credential
- Agent execution5Agent tool clientPresents credential to the targetOAuth access token / API key / AWS SigV4
- Tool / business resource6Downstream APIEnforces scope, tenant and business rules
Configure inbound JWT discovery/claims or IAM permissions, outbound credential providers, workload access and any user consent required by the flow.
Inbound caller tokens and outbound tool credentials are distinct. OAuth user delegation may require consent; AWS targets can use authorized IAM credentials.
- Inbound authentication at Runtime/Gateway and outbound credential brokerage have separate configurations. Do not assume the incoming JWT is valid for every tool.
- AgentCore Identity does not make every proposed action permissible. Target scopes, Gateway Policy where configured, and business authorization still apply.
References: Inbound JWT authorizer · Inbound and outbound example.
Identity protocols
JWT is a format; OAuth grants API access; OIDC adds user authentication; SAML federates enterprise sign-in; STS issues AWS credentials.
A compact claims container, often signed. The protocol and token profile define how it is used.
- Trusted signing authority1IssuerCreates claimsSigned JWT
- Client / transport2Token holderCarries the token to its intended recipientJWT in the expected flow
- Validation boundary3RecipientChecks signature, issuer, intended recipient and lifetime
iss· issuer- Which trusted authority issued it?
sub· subject- Which user or workload does it identify?
aud· audience- Which recipient is it intended for?
exp· expiration- When must it stop being accepted?
- Signature
- Verify against the trusted issuer's permitted keys/algorithms.
- Common claims: iss = issuer; sub = subject; aud = intended audience; exp = expiry. Requirements depend on the token profile.
- Signature validation detects tampering and authenticates the trusted signer. Decoding base64url is not validation; a signed JWT is not necessarily encrypted.
- JWT is not an authentication protocol. An OAuth access token can be JWT-shaped or opaque.
References: JWT specification.
Obtain limited access to a protected resource. This example uses the authorization-code flow with PKCE.
- Client1ApplicationStarts code + PKCE flowAuthorization request + code challenge
- Provider2Authorization serverUser authentication / consent as requiredAuthorization code
- Application3Client callbackReceives and redeems codeCode + PKCE verifier
- Provider4Token endpointValidates code and client/PKCE contractAccess token
- Application5API clientHolds the scoped access tokenAccess token
- Resource server6Protected APIValidates token and required scopes/policy
- The code is exchanged at the token endpoint; it is not the access token. Other grants, such as client credentials, serve different principals.
- OAuth alone does not standardize a user login result for the application. ID tokens come from OIDC.
References: OAuth framework · PKCE.
Add a standardized user identity result to an OAuth flow by requesting the openid scope.
- OIDC client1ApplicationStarts sign-in with openid scopeAuthorization request + PKCE challenge
- Trusted IdP2OpenID ProviderAuthenticates the userAuthorization code
- Application3Client callbackRedeems the codeCode + PKCE verifier
- Trusted IdP4Token endpointIssues the authentication resultID token + access token
- Client validation5ApplicationValidates ID token; creates login sessionAccess token for intended API
- Resource server6Protected APIValidates its token contract and policy
- An ID token tells the client about the authentication. Its audience identifies the client; it is not a general-purpose API access token.
- The API applies its configured access-token contract. Validate issuer, intended audience/client, expiry, signature and token type as required.
- Some integrations explicitly accept ID tokens. Follow that integration's documented contract; do not substitute token types merely because both are JWTs.
References: Cognito OIDC tokens · Token validation.
Exchange an XML assertion between an explicitly trusted identity provider and a service provider.
- Workforce1EmployeeStarts enterprise SSOSign-in
- Corporate IdP2Microsoft Entra IDAuthenticates the employeeSigned SAML assertion
- AWS service provider3IAM Identity CenterValidates SAML trust; creates workforce session
- Metadata/certificates establish the trust relationship. Validate signature, issuer, recipient/audience and validity under the integration contract.
- SAML is not a JWT. SCIM provisions users/groups; it is separate from the SAML sign-in. Direct IAM SAML federation can use AssumeRoleWithSAML.
References: Workforce federation · Direct IAM SAML.
A trusted federation assertion can be exchanged for an authorized role session. STS is an AWS service, not a login protocol.
- Trusted external issuer1OIDC providerIssues a signed job/service-account JWTOIDC JWT
- AWS federation boundary2AWS STS + role trustAssumeRoleWithWebIdentity validates issuer/claims and trustAccess key ID + secret + session token
- Workload process3SDK role sessionUses expiring AWS credentialsSigV4-signed API request
- AWS resource4AWS APIRole/resource policies and guardrails apply
- For web identity, call AssumeRoleWithWebIdentity. AWS validates the token/provider and role trust conditions before issuing credentials.
- The result contains access key ID, secret access key, session token and expiration. SDKs generally sign AWS requests with SigV4.
- Authentication tokens do not automatically grant IAM permissions. The role/session and applicable resource policies, boundaries and SCPs still constrain actions.
References: STS operations · SigV4.
AWS authentication and authorization
Who is the principal? Then may that principal perform this action on this resource? Authentication and federation supply trusted identity; authorization evaluates the requested access.
6. Pillar · Evaluation & observability
Quality before release + evidence from production
Held-out data + rubric + critical-cohort release gates.
What must the output satisfy?
-
Relevant, supported answer
Held-out retrieval/answer evaluation and rubrics
Bedrock Evaluations
-
Required schema / exact business values
Validate structure; use authorized deterministic tools
Lambda
-
Uncertain / high-impact result
Calibrated fallback or supported human review
Ground Truth / A2I
-
Bias, drift, intended use
Supported analysis/monitoring and governance records
Clarify / Model Monitor
Model Cards / Dashboard
Compare baseline/candidate on the same important cohorts. A citation, model confidence, or completed evaluation job alone does not prove correctness.
Choose evidence that answers the operational question.
What is the symptom?
-
Wrong / inconsistent answers
Task, retrieval, answer-quality evaluation
Bedrock Evaluations
-
Tokens, failures, latency trends
Metrics and alarms
CloudWatch
-
Which dependency/stage is slow?
Instrumented spans and correlation IDs
OpenTelemetry / X-Ray
-
Known user/API journey broke
Configured canary plus output/tool assertions
CloudWatch Synthetics
-
Unusual billed spend
Cost Explorer, Budgets, anomaly detection
cost tools
Operational health and answer quality need different evidence. Instrument the application, retrieval, model, and tools together.
AWS assurance and customer workload evidence have different owners.
What do you need to know?
-
AWS compliance reports / agreements
Retrieve AWS evidence on demand
Artifact
-
Customer framework assessment
Configured evidence collection; eligibility applies
Audit Manager
-
Resource configuration / rule compliance
Configurations, changes, evaluations
Config
-
Who called which API?
Supported account/API events
CloudTrail
-
What prompt/response was captured?
Opt-in supported content logging
Model invocation logging
-
Workload vulnerabilities
Supported workload coverage/scans
Inspector
-
Prioritized combined security findings
Supported services and selected bundle/coverage
Security Hub
Artifact is not a continuous workload auditor. Configure collection, review findings, and resolve issues; see the shared-responsibility guide.
AWS security, compliance and auditing
AWS secures its underlying cloud infrastructure. Customers configure access, data protection, workload controls and audit coverage according to the service and shared responsibility model.
Audit and findings paths carry metadata/evidence; they are not the application's user/model data path. Collection does not certify compliance or automatically remediate every issue. AWS shared responsibility model.
7. Packaged apps
Buy versus build
Product workflow versus custom application ownership.
Which ownership fits?
-
Packaged employee experience
Check connectors, identity, permissions, and plan
Quick
-
Existing Q Business workload
Check subscription/index choices and migration
Q Business
-
Developer assistance / modernization
Supported development and transformation workflows
Q Developer
-
Custom UX and business tools
Own the application and authorization
Bedrock
Bedrock AgentCore
Connected architectures
Trace the handoffs. Each node opens the same service card used in the clusters.
A known batch of reports needs extraction, analysis, and a human decision.
- EventBridge / S3 eventsObject-created event
- AWS Step FunctionsStandard + Map
- Bedrock Data AutomationExtract and validate
- Amazon BedrockAnalyze
- AWS Step FunctionsCallback approval
Map iterates the reports; approval waits in the workflow. The final business write needs authorization and idempotency.
An agent diagnoses a pump and proposes a work order.
- Bedrock AgentCoreRun the agent
- MCP tool integrationRead permitted evidence
- AWS Step FunctionsApprove a proposed write
- Amazon DynamoDBTrack durable action identity
The maintenance API authorizes the exact plant/action and reconciles retries. Conversation memory is not the plant record.
New manuals must become searchable without indexing invalid or sensitive text.
- Amazon S3Version the source
- AWS GlueValidate and redact
- Bedrock Knowledge BasesPace sync and inspect failures
- Bedrock rerankingSelect useful context
Compare retrieval before generation. A reranker cannot fix missing ingestion, and metadata scope must come from trusted identity.
Users speak and receive incremental spoken replies.
- Amazon TranscribePreserve speaker turns
- Converse / ConverseStreamStream generated text
- Amazon PollySynthesize speech
- Amazon DynamoDBPersist scoped state/ratings
Choose a compatible streaming path at every hop and measure end-to-end latency; use WebSockets when bidirectional push is required.
A prompt/model change must pass quality checks and reach the intended route.
- CodePipeline / CodeBuildEvaluate held-out cases
- Model RegistryApprove model artifact
- SageMaker AIDeploy and verify
- AWS AppConfigRoll out route/config
Prompt-only changes may not need a model package. Verify the actual live version; sandbox shadow writes and retain a compatible rollback target.
References and practice
Cards and guides link to AWS for current contracts, limits, availability, and rates. Capacity comparisons include Bedrock tiers, SageMaker hosting/GPU support, and Step Functions modes. Reviewed 22 October 2026.
Study sequence: Infrastructure and evaluation → AWS AI Services → AIP-C01 architecture and practice. AWS’s exam scope defines certification coverage.