Headless Deployment Guide
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: MIT-0
Headless Deployment Guide
Section titled “Headless Deployment Guide”Overview
Section titled “Overview”A headless deployment of the GenAI IDP Accelerator deploys the full document-processing backend — OCR, classification, extraction, assessment, summarization, Step Functions workflows, storage, monitoring — without the browser-based UI and its supporting services. It is a first-class deployment mode supported by idp-cli, the idp-sdk, and the underlying CloudFormation template transformation.
Headless is not specific to GovCloud. It is available in any supported region, both Commercial and GovCloud, whenever the web UI is not needed or not permitted:
- API-only / pipeline integrations — you drive IDP from
idp-cli, theidp-sdk, another application, or direct S3 uploads and don’t need the Web UI. - Policy / compliance constraints — your environment restricts services the UI depends on (Cognito, CloudFront, AppSync, or WAF WebACL for CloudFront).
- Cost optimization — remove UI-adjacent resources when they won’t be used.
- GovCloud — headless is required in AWS GovCloud regions (
us-gov-*) because the UI-layer services (CloudFront, AppSync, Cognito, WAF for CloudFront) are not available there. See also GovCloud Deployment for GovCloud-specific considerations.
If you want the Web UI but cannot use CloudFront (for example, private-network / VPC-only requirements in a Commercial region), use ALB Hosting instead — ALB hosting keeps the full UI while serving it from within a VPC.
What Gets Removed in Headless Mode
Section titled “What Gets Removed in Headless Mode”The headless transformation strips the following resource groups from the template:
Web UI Components
Section titled “Web UI Components”- CloudFront distribution and origin access identity
- WebUI S3 bucket and build pipeline
- CodeBuild project for UI deployment
- Security headers policy
API Layer
Section titled “API Layer”- AppSync GraphQL API and schema
- All GraphQL resolvers and data sources
- Lambda resolver functions
- Test Studio resources (Lambda functions, resolvers, data sources, SQS queues)
- Chat infrastructure (ChatMessagesTable, ChatSessionsTable)
- Agent chat processors and resolvers
Authentication
Section titled “Authentication”- Cognito User Pool and Identity Pool
- User pool client and domain
- Admin user and group management
- Email verification functions
WAF Security (CloudFront-facing)
Section titled “WAF Security (CloudFront-facing)”- WAF WebACL and IP sets
- IP set updater functions
- CloudFront protection rules
Agent & Analytics Features
Section titled “Agent & Analytics Features”- AgentTable and agent job tracking
- Agent request handler and processor functions
- MCP / AgentCore Gateway resources (AgentCoreAnalyticsLambdaFunction, AgentCoreGatewayManagerFunction, etc.)
- External MCP agent credentials secret
- Knowledge-base query functions
- Chat-with-document features
- Text-to-SQL query capabilities
HITL (Human-in-the-Loop) Support
Section titled “HITL (Human-in-the-Loop) Support”- SageMaker A2I Human-in-the-Loop
- Private workforce configuration
- Human-review workflows
- A2I flow definition and human task UI
- Cognito client for A2I integration
Discovery (Web-UI-dependent)
Section titled “Discovery (Web-UI-dependent)”- BlueprintOptimization, MultiDocDiscovery, and DiscoveryProcessor resources that depend on AppSync / GraphQL
What Is Retained
Section titled “What Is Retained”All core document-processing functionality is retained:
Document Processing
Section titled “Document Processing”- ✅ All processing patterns (BDA, Textract+Bedrock, Textract+SageMaker+Bedrock)
- ✅ Complete pipeline (OCR, Classification, Extraction, Assessment, Summarization, Evaluation)
- ✅ Step Functions workflows and Lambda processing
- ✅ Custom prompt Lambda integration
Storage & Data
Section titled “Storage & Data”- ✅ S3 buckets (Input, Output, Working, Configuration, Logging)
- ✅ DynamoDB tables (Tracking, Configuration, Concurrency)
- ✅ Data encryption with customer-managed KMS keys
- ✅ Lifecycle policies and data retention
Monitoring & Operations
Section titled “Monitoring & Operations”- ✅ CloudWatch dashboards and metrics
- ✅ CloudWatch alarms and SNS notifications
- ✅ Lambda function logging and tracing
- ✅ Step Functions execution logging
Integration
Section titled “Integration”- ✅ SQS queues for document processing
- ✅ EventBridge rules for workflow orchestration
- ✅ Post-processing Lambda hooks
- ✅ Evaluation and reporting systems
Architecture
Section titled “Architecture”Standard (with Web UI) Deployment
Section titled “Standard (with Web UI) Deployment”graph TB A[Users] --> B[CloudFront Distribution] B --> C[React Web UI] C --> D[AppSync GraphQL API] D --> E[Cognito Authentication] E --> F[Core Processing Engine] F --> G[Document Workflows] G --> H[S3 Storage]Headless Deployment
Section titled “Headless Deployment”graph TB A[Direct S3 Upload] --> F[Core Processing Engine] I[IDP CLI] --> F J[IDP SDK / App Integration] --> F F --> G[Document Workflows] G --> H[S3 Storage] F --> K[CloudWatch Monitoring]Deploying a Headless Stack
Section titled “Deploying a Headless Stack”Headless deployment is available through idp-cli and the idp-sdk. Two paths are supported:
- Pre-built published template (Commercial regions only) — the CLI downloads the published
idp-main.yaml, transforms it to headless in-place, uploads it to a temporary S3 location in your account, and deploys. No local build required. - Build from source (
--from-code .) — required for GovCloud (templates are not published for GovCloud regions), and useful for development / testing in any region.
Prerequisites
Section titled “Prerequisites”- AWS CLI with credentials for the target account/region
- Python 3.12+ with the IDP CLI installed (
make setup-venv && source .venv/bin/activate) - For
--from-codebuilds only: AWS SAM CLI, Docker, Node.js >= 22.12, npm >= 10
Deploy in a Commercial Region (no local build)
Section titled “Deploy in a Commercial Region (no local build)”Fastest path. Uses the pre-published template, transforms it to headless, and deploys:
idp-cli deploy \ --stack-name my-idp-headless \ --region us-east-1 \ --admin-email user@example.com \ --headless \ --waitNote: In headless mode,
--admin-emailis still accepted but has no effect — no Cognito user pool is created.
Deploy in a Commercial Region from Local Source
Section titled “Deploy in a Commercial Region from Local Source”Use this for development iterations or to deploy a customized build:
idp-cli deploy \ --stack-name my-idp-headless-dev \ --region us-east-1 \ --from-code . \ --headless \ --waitDeploy to GovCloud (always headless, always from source)
Section titled “Deploy to GovCloud (always headless, always from source)”GovCloud must use --headless (UI services are unavailable) and must use --from-code (no public GovCloud templates are published). The CLI auto-detects GovCloud regions (us-gov-*) and applies the GovCloud configuration defaults (ARN partition fixes, GovCloud-compatible Bedrock models, GovCloud configuration presets):
idp-cli deploy \ --stack-name my-idp-headless \ --region us-gov-west-1 \ --from-code . \ --headless \ --waitSee GovCloud Deployment for GovCloud-specific requirements (supported Bedrock models, ARN partition, pricing, compliance notes).
Publish a Headless Template Separately
Section titled “Publish a Headless Template Separately”If you want to publish the headless template to S3 but deploy later (or share it with others), use idp-cli publish --headless:
idp-cli publish \ --source-dir . \ --region us-east-1 \ --headlessThis builds both the standard and the headless template variants, uploads both to S3, and prints deployment URLs and 1-click launch links for each.
Deploy Programmatically via the SDK
Section titled “Deploy Programmatically via the SDK”The idp-sdk exposes the same capability through the publish namespace:
from idp_sdk import IDPClient
client = IDPClient(region="us-east-1")
# Option A: Build both standard and headless variantsresult = client.publish.build( source_dir=".", region="us-east-1", headless=True,)print("Headless template URL:", result.headless_template_url)
# Option B: Transform an existing (already-built) template to headlesstransform_result = client.publish.transform_template_headless( source_template="./.aws-sam/idp-main.yaml", output_path="./.aws-sam/idp-headless.yaml", update_govcloud_config=False, # set True for GovCloud defaults)print("Headless template written to:", transform_result.output_path)See IDP SDK — Publish Operations for full parameter and return-type details.
Access Methods (No Web UI)
Section titled “Access Methods (No Web UI)”Without the Web UI, interact with the system through one of:
1. Direct S3 Upload
Section titled “1. Direct S3 Upload”# Upload documents directly to the Input bucket (from stack outputs)aws s3 cp my-document.pdf s3://<InputBucket>/my-document.pdf2. IDP CLI
Section titled “2. IDP CLI”# Process a local directory and monitor progressidp-cli process \ --stack-name my-idp-headless \ --dir ./documents/ \ --monitor
# Download extraction resultsidp-cli download-results \ --stack-name my-idp-headless \ --batch-id <batch-id> \ --output-dir ./results/See IDP CLI documentation for the full command reference.
3. IDP SDK (Python)
Section titled “3. IDP SDK (Python)”from idp_sdk import IDPClient
client = IDPClient(stack_name="my-idp-headless", region="us-east-1")
# Submit a document for processingdoc = client.document.process(file_path="./invoice.pdf")
# Download extraction results when completeclient.document.download_results( document_id=doc.document_id, output_dir="./results/",)See IDP SDK documentation for the full API reference.
4. Check Progress
Section titled “4. Check Progress”Use the CLI status command, the SDK document.get_status() / batch.get_status() methods, or navigate to the AWS Step Functions console via the link in the stack’s CloudFormation Outputs tab.
Features Not Available in Headless Mode
Section titled “Features Not Available in Headless Mode”The following features depend on the UI/AppSync/Cognito stack and are therefore not available in a headless deployment:
- Web-based user interface (document upload, viewer, dashboards)
- Real-time document status updates via WebSockets
- Interactive configuration management via the UI
- Cognito-backed user authentication and RBAC
- CloudFront content delivery
- WAF security rules and IP filtering (for CloudFront)
- Agent Companion Chat (conversational UI)
- Agent Analytics (natural-language analytics UI)
- Document knowledge-base chat interface
- Test Studio (UI-driven test management)
- Human-in-the-Loop review UI (A2I)
Workarounds
Section titled “Workarounds”| Capability | Headless alternative |
|---|---|
| Document upload | S3 direct upload, idp-cli process, client.document.process() |
| Status monitoring | idp-cli status, client.document.get_status(), Step Functions console, CloudWatch dashboards |
| Configuration management | Edit the configuration YAML and upload via idp-cli config-upload / client.config.upload() |
| Extraction results | idp-cli download-results, client.document.download_results(), read directly from the Output bucket |
| Evaluation / metrics | Athena queries on the reporting database, idp-cli test-result / test-compare, reporting S3 outputs |
| Authentication / RBAC | Implement at the application / network layer (IAM, API Gateway authorizers, VPC, SSO) |
When to Choose Headless vs. Standard vs. ALB Hosting
Section titled “When to Choose Headless vs. Standard vs. ALB Hosting”| Requirement | Recommended mode |
|---|---|
| You want the full Web UI, deployed with defaults | Standard (CloudFront + CloudFormation) |
| You want the full Web UI but cannot use CloudFront (private network / VPC-only) | ALB Hosting |
| You only need the backend (API / pipeline), no UI | Headless (this guide) |
| Deploying to AWS GovCloud | Headless (required) + see GovCloud Deployment |
| Organization prohibits CloudFront / Cognito / AppSync / WAF | Headless |
Best Practices
Section titled “Best Practices”Security
Section titled “Security”- IAM: Use least-privilege IAM roles for any application / CI/CD credentials that interact with the stack.
- Encryption: Customer-managed KMS keys are enabled by default — keep them.
- Network: If required, deploy Lambda functions and other services in private subnets (see Deployment in Private Network).
- Access control: Implement authentication and authorization at your application or network layer (IAM, VPC, SSO, API Gateway) since Cognito is not deployed.
Operations
Section titled “Operations”- Monitoring: CloudWatch dashboards, alarms, and SNS alerts are still deployed — subscribe your ops email to the AlertsTopic.
- Logging: Configure appropriate log-retention policies for CloudWatch log groups.
- Capacity: Tune
MaxConcurrentWorkflows, Lambda memory, and Bedrock throughput the same way as a standard deployment. See Capacity Planning. - Updates: Re-run
idp-cli deploy --headless(optionally with--from-code .) to apply template or code changes.
Troubleshooting
Section titled “Troubleshooting”- “Region ’…’ is not supported for headless mode” — When you use
--headlesswithout--from-codein a region that has no pre-publishedidp-main.yaml. Options: (a) use a supported region, (b) use--from-code ., or (c) supply--template-urlexplicitly. - CloudFormation
AllowedValues/GraphQLApi.Arnerrors on headless stacks — Ensure you are using a recent version of the CLI; earlier builds had issues that have been fixed (see CHANGELOG forlending-package-sample-govcloudConfigurationMap and Discovery-resource removals). - GovCloud model access — Confirm Bedrock model access is enabled for the models listed in GovCloud Deployment.
Related Documentation
Section titled “Related Documentation”- IDP CLI —
deploy --headless,publish --headless - IDP SDK —
publish.build(),publish.transform_template_headless() - GovCloud Deployment — GovCloud-specific requirements and defaults
- ALB Hosting — Deploying the Web UI inside a VPC (alternative to headless when you still want the UI)
- Deployment in Private Network — Private-network deployment guidance
- Deployment Guide — General build / publish / deploy reference