AWS Certified Generative AI Developer - Professional AIP-C01 Cheatsheet
AWS Certified Generative AI Developer - Professional
Download free PDFFoundation Model Integration, Data Management, and Compliance (31%)
Model and deployment selection
- **Model selection** balances task quality, supported languages and modalities, context capacity, latency, throughput, cost and Regional availability. Benchmark representative inputs before committing to a model.
- **Amazon Bedrock** exposes managed foundation models. **SageMaker AI** offers control over model containers, instances and endpoints; **JumpStart** supplies supported model deployment starting points.
- **RAG** supplies current external evidence at inference time. **Fine-tuning** adapts behavior or task performance; **continued pre-training** adapts a model to additional domain text. Neither replaces retrieval of frequently changing facts.
- **Custom Model Import** accepts supported model architectures and artifacts. It does not turn an arbitrary SageMaker endpoint into a Bedrock model. Check compatibility and serving requirements.
- **Hybrid inference** may require locally hosted models for sensitive on-premises data and cloud analytics on approved data. Outposts and carrier-edge services have placement constraints; measure network and model latency together.
Prepare text and multimodal data
- **AWS Glue** catalogs datasets and runs scalable ETL. **Glue Data Quality** checks completeness, validity and consistency. Normalize encodings, layouts and schemas; deduplicate and retain lineage before embedding.
- **Textract** extracts document text, forms and tables. **Transcribe** converts audio to text. **Rekognition** supports image and video analysis or moderation; **Bedrock Data Automation** extracts information from supported multimodal inputs.
- For searchable video, preserve **timestamps**, source IDs and links between frames, transcripts and on-screen text in one metadata structure. Index these fields so a search result can locate the original segment.
- **S3 object events** can reach **EventBridge** to start processing workflows. Wait for asynchronous extraction jobs to complete, validate their results, then summarize and index; apply bounded parallelism for upload bursts.
- **AppSync subscriptions** can distribute application updates for collaborative editing. Keep document versions in S3 and application metadata in a database; collaboration and conflict handling require application logic.
Embeddings and vector stores
- **Embeddings** encode semantic similarity. Use the same compatible model and vector dimensions for corpus and query embeddings; changing the embedding model generally requires re-embedding the corpus.
- **Multilingual retrieval** needs an embedding model validated for the supported languages and domain terminology. Test cross-language queries and exact acronyms; embedding generation does not itself translate documents.
- **OpenSearch Service or Serverless** supports vector search and filtering. **Aurora PostgreSQL with pgvector** combines SQL and vector queries. **S3 Vectors** provides managed vector storage and search; compare query latency, filtering and integration needs.
- **Exact search** compares all candidate vectors and can suit small datasets. **HNSW** uses a graph for approximate search; **IVFFlat** searches selected clusters. Tune recall, search effort, memory and index maintenance for the chosen engine.
- Dimension count alone does not determine relevance. Benchmark **recall**, p95 latency, update rate and index memory under realistic concurrency; monitor hot shards, memory pressure and index growth.
Chunking and context budgets
- **Fixed-size chunking** is simple; overlap preserves boundary context at extra storage and token cost. **Semantic chunking** follows meaning. **Hierarchical chunking** retrieves focused children while restoring broader parent context.
- Preserve headings, legal clauses, tables and medical terminology when segmenting. A chunk must retain enough meaning to stand alone. Rebuild embeddings when changing chunk boundaries.
- Budget for **instructions + history + retrieved evidence + tool schemas/results + output** within model limits. Reserve output capacity; increasing maximum output tokens cannot enlarge the context window.
- **RAG** selects relevant evidence for a query. For whole-document coverage, use staged or **map-reduce summarization** and synthesize validated partial results; retrieval of a few passages may omit required sections.
- Long context can still suffer from missed evidence. Remove redundancy, order evidence deliberately and summarize older conversation turns while retaining important facts and provenance. Count tokens with a supported model-aware mechanism.
Retrieve, rerank and ground
- **Semantic search** matches meaning; **keyword search** preserves exact identifiers, citations and acronyms. **Hybrid search** combines both. Use metadata filters to narrow eligible candidates before expensive ranking.
- **Reranking** evaluates query-document relevance after initial retrieval. Retrieve a broader candidate set, rerank it, and pass only the best evidence that fits the context budget; measure the added latency.
- **Query decomposition** separates a complex question into focused subqueries. **Query expansion** adds useful terms or synonyms; uncontrolled expansion can dilute intent and increase irrelevant matches.
- **GraphRAG with Neptune Analytics** is useful for connected entities and multi-hop relationships. A vector similarity match alone does not explain a chain of relationships across documents.
- **Retrieve** returns evidence for custom orchestration. **RetrieveAndGenerate** combines retrieval and generation with citations; its streaming counterpart sends incremental results. Validate that cited passages actually support each claim.
Corpus access, metadata and freshness
- Define consistent **metadata** for source, owner, publication date, language, content type, version and access scope. S3 object tags or headers must be explicitly mapped into the retrieval index; they do not automatically become search filters.
- Use **publication-date filters** for content-age rules. S3 Lifecycle acts on object age under its rules; deleting a source object does not instantly remove its indexed representation. Synchronize updates and deletions.
- **Direct ingestion** and connector synchronization have different freshness characteristics. Use transactional APIs for rapidly changing values such as availability or order status when stale indexed data is unacceptable.
- **Glue Data Catalog** records schemas and source metadata. **Lake Formation** governs supported lake access, including table and column permissions and LF-Tags. Transform or exclude sensitive fields before constructing prompts.
- **Amazon Q Business** retrieves enterprise content with user access context. Configure connector ACLs and identity mappings; S3 prefixes alone do not establish end-user permissions. Authorized data-accessor integration can expose customer-controlled indexes to approved applications.
Implementation and Integration (26%)
Inference APIs and conversation state
- **InvokeModel** uses model-specific request and response formats. **Converse** provides a common messages interface for supported models; SDKs in different languages can use the same IAM-based authentication pattern.
- **Converse** requests include the relevant message history. The application owns durable session storage, encryption, retention and user isolation; ordinary inference calls do not create persistent conversation memory.
- **InvokeModelWithResponseStream** and **ConverseStream** deliver incremental events. Render text deltas, handle tool and completion events, and distinguish **time to first token** from full-response latency.
- The entire delivery path must support streaming. **WebSocket APIs** can push chunks through a backend; an HTTP or GraphQL path needs compatible streaming support and timeouts at every hop.
- Treat partial output as incomplete. Set model, SDK and backend timeouts coherently, support cancellation, and persist a completed response separately when durable audit records are required.
Prompt templates and output contracts
- **Prompt Management** maintains reusable prompts, variables, variants and versions. Keep tone and business-unit context as explicit inputs; test template changes with representative complex inputs.
- Specify the **task, evidence boundaries, audience and output schema**. Use few-shot examples for difficult formats. Delimit retrieved content as data and instruct the model to acknowledge insufficient evidence.
- **Temperature** controls sampling variability; lower values can improve consistency but do not guarantee identical or accurate outputs. Tune supported sampling parameters against task-specific evaluations.
- **Structured output** still needs syntax, schema and business-rule validation. Add mandatory fixed wording deterministically in application code when its exact presence is required.
- **Bedrock Flows** connects prompts, models, knowledge bases and supported service or Lambda nodes. Keep review approvals, notifications and multi-Region promotion explicit in the delivery workflow; versioning alone does not implement them.
Agents, tools and memory
- **Bedrock Agents** combines model-driven planning with knowledge bases and **action groups**. Define tool inputs clearly; use Lambda execution or return control to let the application perform authorized actions.
- **ReAct** alternates model decisions, actions and observations. Limit steps, time and tokens; inspect tool failures and stop repeated loops rather than allowing unbounded retries.
- **AgentCore Runtime** hosts agent code with managed execution and session isolation. **Memory** supports retained interaction context, **Gateway** exposes tools, and **Identity** manages authentication and credential access.
- Scope memory by **user, tenant and session**. Distinguish short-term conversation context from long-term facts or preferences; govern extraction, retention and deletion, and avoid treating model-written memory as authoritative.
- **Tools** should return structured results and explicit errors. Enforce authorization, input validation and idempotency outside the model. Require confirmation or human approval for consequential actions.
MCP and specialized agents
- **Model Context Protocol (MCP)** standardizes client access to tools, resources and prompts. **stdio** suits local child processes; **Streamable HTTP** supports remote services with compatible authentication.
- For a remote MCP server, validate token issuer, audience and scopes, and authorize each tool operation. **API keys** are not a substitute for user identity; never trust a user ID supplied only in a prompt.
- **Supervisor and collaborator agents** separate intent routing from domain-specific work. Use specialized knowledge bases and scoped tool permissions; routing instructions alone do not create a data security boundary.
- **Strands Agents SDK** supports code-defined agent workflows. Choose sequential execution for dependencies and parallel execution for independent work; preserve typed handoffs and correlation IDs across agents.
Workflow state and human review
- **Step Functions** provides durable orchestration. Use **Parallel** for independent branches, **Map** for collections, and **Retry/Catch** for transient errors and fallback paths; extra parallelism still consumes model quotas.
- **Standard workflows** support callback tasks using **waitForTaskToken**. A secured reviewer application returns **SendTaskSuccess** or **SendTaskFailure**; record reviewer identity, decision and time, and handle approval expiry.
- **Express workflows** fit short, high-volume work; use a workflow type that supports the required duration and integration pattern. **Amazon A2I** supports human review integrations and custom review workflows.
- Keep Step Functions state below the **256 KiB payload limit**. Store large documents or intermediate model results in S3 and pass references. Use **ResultSelector** and **ResultPath** to control retained state.
- **SQS** buffers asynchronous work and separates fast responses from costly escalation. Add dead-letter handling, backpressure and deduplication. Calibrate small-model confidence before using it to trigger a larger model.
Configuration and repeatable delivery
- **AWS AppConfig** externalizes model IDs, prompt references, routing rules and feature flags. Validate parameter ranges with schemas or validators; use deployment strategies and CloudWatch alarms for staged rollout and rollback.
- The **AppConfig Agent Lambda extension** caches and polls configuration. Account for propagation delay and version consistency across instances and Regions; use explicit rules for customer tier, residency and model eligibility.
- **CDK or CloudFormation** defines reusable environments. Version infrastructure and application artifacts; apply **CloudFormation Guard** policy checks in CI/CD and use approved **Service Catalog** products where appropriate.
- **SageMaker Pipelines** can automate preparation, training, evaluation and deployment after approved S3 events. Gate deployment on quality checks. **Q Developer customizations**, where supported, supply organization code context; project rules supply local guidance.
AI Safety, Security, and Governance (20%)
Match the guardrail policy to the risk
- **Content filters** address categories such as hate, insults, sexual content, violence, misconduct and prompt attacks. Tune thresholds against false positives and false negatives for the intended audience.
- **Denied topics** define prohibited subject matter, such as investment advice. **Word filters** block configured words or phrases, such as competitor names; they serve a different purpose from semantic topic detection.
- **Sensitive information filters** detect supported PII entities and custom regex patterns. Choose **BLOCK**, **ANONYMIZE** for masking, or **NONE** for detection without intervention where supported.
- Configure **input and output policies** deliberately. Detect-only behavior returns findings but does not enforce a block or send a notification automatically; route findings to application monitoring or review.
- **ApplyGuardrail** evaluates content independently of model invocation. Attach approved guardrails to inference where supported, and use the **bedrock:GuardrailIdentifier** IAM condition to enforce their use on applicable operations.
Grounding and defense in depth
- **Contextual grounding** compares a response with supplied source material; **relevance** checks alignment with the query. Raising a threshold flags more low-scoring responses. Tune both using verified test cases.
- **Automated Reasoning checks** assess responses against formalized policy rules. They complement evidence retrieval and business validation; they do not establish that every external factual claim is true.
- **Prompt injection** may arrive through a user, retrieved document or tool result. Separate instructions from untrusted data, restrict tools and data access, and validate proposed actions independently of model text.
- **WAF** can help with web attack patterns and rate controls. It does not replace semantic safety checks, database authorization or validation of generated SQL.
- For **text-to-SQL**, parse generated statements, allow only approved schemas and operations, bind values safely, and enforce read-only database permissions and query limits. Log transformations after privacy filtering.
Privacy and durable audit records
- If PII must not reach the model, **detect and redact before inference**, including extracted document text, retrieved passages and tool results. Repeat output screening because generated text can introduce identifiers.
- **Comprehend** detects supported PII; **Comprehend Medical** supports PHI detection. Apply actual redaction to the detected spans. **Macie** discovers sensitive data in S3; discovery is not automatic redaction.
- **CloudTrail** records supported API activity and configured data events. **Model invocation logging** captures supported model inputs, outputs and metadata; **application logs** record user actions, review decisions and evidence references.
- Redact sensitive fields **before durable logging** when raw retention is prohibited. Protect logs with scoped access and encryption; encryption does not remove PII. Capture multimodal payloads only under an approved retention policy.
- **S3 Object Lock** supplies WORM retention or legal holds on object versions. Compliance-mode retention cannot be shortened during its term; **Lifecycle** controls eligible aging and deletion. Database TTL is not an immutable audit mechanism.
Identity, private access and residency
- **IAM roles** provide temporary credentials for Lambda, containers and service jobs. A service role needs both a **trust policy** and permissions; **iam:PassRole** authorizes a caller to pass an eligible role.
- **Federation** connects enterprise identity providers through supported SAML or OIDC patterns. Enforce department and tenant access in trusted identity claims and IAM or application policy; keep long-lived AWS credentials out of frontends.
- **Cross-account AssumeRole** needs target-role trust and resource permissions. Preserve user context with controlled **session tags** or source identity for audit correlation; a shared agent role does not automatically represent each user.
- **PrivateLink interface endpoints** provide private access to Bedrock runtime services. Configure DNS, security groups, endpoint policies and IAM together. A private subnet using NAT can still reach a public endpoint.
- **SCPs** and permissions boundaries limit maximum permissions; neither grants access. Explicit deny overrides an allow. **Control Tower** organizes landing-zone governance, while enforceable policies restrict approved accounts and Regions.
- **Geographic cross-Region inference profiles** route within their defined geography; a **global** profile has broader scope. Single-Region residency requires a compatible in-Region design. Review inference and guardrail destinations, IAM and SCPs together.
Operational Efficiency and Optimization for GenAI Applications (12%)
Capacity and latency choices
- **On-demand inference** suits variable demand. **Provisioned Throughput** reserves supported model capacity in model units; invoke the **provisioned model ARN** to consume it rather than the base model ID.
- **Cross-Region inference** can absorb demand across eligible Regions, subject to quotas and residency policy. It is distinct from provisioned capacity; do not assume reserved capacity automatically scales or transfers across Regions.
- **Latency-optimized inference** is model and Region dependent. Smaller models, shorter outputs and fewer sequential calls can improve response time. Streaming improves perceived responsiveness without guaranteeing faster completion.
- For **SageMaker real-time endpoints**, preload model weights, retain warm capacity and tune batching. Batching improves throughput but can add queue delay; **asynchronous inference** is suited to work that can tolerate delayed results.
- Measure **p95/p99** latency under representative traffic. Break down retrieval, reranking, model startup, first-token and generation time; concurrency targets and strict latency requirements need load testing.
Caching and token economics
- **Prompt caching** reuses supported repeated prompt prefixes or checkpoints. **Response caching** reuses completed answers. **Semantic caching** uses embedding similarity to match equivalent questions.
- Scope cache keys by **tenant, authorization, model, prompt and data version**. Validate similarity thresholds, TTLs and invalidation. Do not reuse personalized answers or stale transactional facts across users.
- **Intelligent prompt routing** chooses among supported model options for quality and cost. Proprietary business rules or regulatory routing may require application logic backed by AppConfig.
- Track **input and output tokens**, retries, tool loops and evaluation cost. Preflight token budgets before inference and enforce server-side limits; API request-rate quotas and guardrails are not token-budget policies.
- **Batch inference** fits offline workloads where supported. Attribute consumption by application and business unit using request metadata, custom metrics and supported inference profiles; include retrieval and storage costs in total cost.
Retries, backpressure and recovery
- Use **exponential backoff with jitter** for retryable throttling or transient service failures. Bound attempts and total time; fix authorization, validation and context-length errors instead of repeatedly resending them.
- **SDK standard retry mode** provides bounded retries; **adaptive mode** adds client-side rate control. Scope clients appropriately so throttling in one workload does not unintentionally slow unrelated traffic.
- A **circuit breaker** opens after a defined failure threshold, routes to an approved fallback, then uses limited half-open probes before closing. Persist shared breaker state when many workers must coordinate.
- A broken model stream generally has no arbitrary **resume-from-token** operation. Mark partial output, restart safely or ask for continuation under application control; prevent duplicate side effects on retried tool calls.
- Use **queue depth**, message age, concurrency limits and deadline budgets for backpressure. Fallback models, cached responses and alternate Regions must preserve safety, quality and residency constraints.
Observe the whole request
- **CloudWatch** exposes Bedrock invocation, latency, error, throttle and token metrics. Use Logs Insights for invocation analysis; model quality and demographic fairness need explicit evaluation signals or custom metrics.
- Add **correlation IDs**, model and prompt versions, tool names, session scope and request type to traces and sanitized logs. Use **X-Ray or OpenTelemetry** to locate latency and errors across service boundaries.
- **AgentCore Observability** supplies service metrics and supports agent traces. Configure log destinations and supported instrumentation for tool-level visibility; built-in infrastructure metrics do not automatically reveal every custom tool operation.
- **Anomaly detection alarms** compare metrics with learned baselines. Use metric math for error percentages; **composite alarms** combine alarm states. Connect alarms to SNS or automation for actionable responses.
- Combine technical metrics with **conversion, revenue, resolution rate and user feedback** in dashboards such as CloudWatch or Managed Grafana. Cost anomalies, token surges and quality drift are separate signals that need correlation.
Testing, Validation, and Troubleshooting (11%)
Evaluate retrieval and generation separately
- Build a **golden dataset** with verified expected facts and representative easy, complex, multilingual, adversarial and privacy-sensitive cases. Use anonymized data and record dataset versions.
- **Retrieval evaluation** measures relevance and coverage of evidence; precision at k and recall expose different failures. **Generation evaluation** measures correctness, completeness, faithfulness, citation support, safety and task success.
- **Bedrock evaluation jobs** can use supported automated or LLM-judge methods. Follow the required **JSONL** schema in S3, choose generator and evaluator roles correctly, and grant access to input and output locations.
- **LLM-as-a-judge** scales assessment but can be biased or inconsistent. Calibrate its rubric with experts and route uncertain or high-risk cases to targeted human review. Sentiment and entity extraction alone do not measure factual accuracy.
- **SageMaker Clarify** supports bias analysis for suitable workflows. Compare outcomes across demographic groups with enough samples and suitable fairness definitions; guardrail intervention counts do not measure recommendation fairness.
Regression tests and controlled releases
- Compare **prompt, model, chunking and retrieval versions** on the same test cases. Change one major factor at a time and retain outputs, parameters and scores for historical comparison.
- **Semantic similarity** detects meaning changes better than exact string matching, but similar wording can still hide factual contradictions. Combine similarity with reference-based checks, schema tests and safety criteria.
- Run evaluation in **CI/CD** and block promotion when any required language, demographic group, safety check or quality threshold fails. Schedule repeat tests with EventBridge and bounded parallel execution.
- **A/B tests** compare live variants; **canary releases** expand traffic gradually with health checks and rollback. Prompt versioning does not split traffic by itself; implement routing and capture the assigned variant.
- Collect **explicit user ratings**, flagged events and review decisions alongside operational metrics. Refresh evaluation datasets as traffic changes; distinguish semantic regression from infrastructure slowdown.
Troubleshoot the correct boundary
- **Context exceeded or truncated output:** count the complete request, reserve output tokens, inspect stop reasons, reduce redundant context and choose appropriate chunking or staged synthesis. A timeout increase cannot fix a context limit.
- **Irrelevant or stale retrieval:** inspect source freshness, metadata mapping, tenant/date filters, embedding compatibility, keyword coverage and reranking. Test retrieval before changing the generation model.
- **AccessDenied:** inspect explicit SCP denies, role trust, identity policies, resource policies, KMS and endpoint policies. A successful ingestion job does not prove the runtime caller has retrieval permissions.
- **OpenSearch Serverless authorization** spans IAM API access, **data access policies**, and network access. Grant the actual Bedrock or application principal the needed collection/index permissions; pattern rules can cover approved future resources.
- **Token or tool-cost surge:** trace repeated instructions, long histories, oversized tool results, retry amplification and agent loops. **Stale secrets or configuration:** enforce expiry and version checks, invalidate caches and propagate refreshed references before reuse.