GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - aws-samples/sample-video-demo-generator-system: A system that generates recorded browser session videos from public webpages, based on a webpage URL and the description of the needed clickthrough recording.

BranchesTags
Open more actions menu

Latest commit

 

History

13 Commits
13 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
docs/images
docs/images
 
 
infra
infra
 
 
packages
packages
 
 
scripts
scripts
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Config
Config
 
 
LICENSE
LICENSE
 
 
NOTICE
NOTICE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
pyproject.toml
pyproject.toml
 
 
requirements-dev.txt
requirements-dev.txt
 
 

Repository files navigation

aws-bedrock-video-demo-generator

Generate professional walkthrough videos of any public website using Amazon Bedrock, AgentCore Browser, and Amazon Polly — fully autonomous, no scripting required.

You provide a URL and a one-sentence description ("Show me how to sign up for an AWS account"). The system browses the page, generates a step-by-step script with Claude, executes the script in a managed Chrome browser, records the screen, mixes in synthesized narration, and serves the final MP4 from CloudFront.

Features

  • Natural language input — describe the demo in plain English; Claude generates the click/scroll/type sequence
  • Autonomous browser execution — runs in Amazon Bedrock AgentCore Browser with built-in popup/overlay dismissal, retry logic, and circuit breakers
  • Step-aligned narration — Amazon Polly synthesizes voice tracks that are time-stamped to match the recorded video
  • Script review and edit — pause the workflow at script generation; tweak steps before execution
  • WebSocket progress — live status updates as the demo runs
  • CloudFront delivery — finished videos served via CDN with cache-friendly signed URLs

Architecture

Architecture

Component AWS Service
REST + WebSocket API API Gateway (REST + WebSocket) + Lambda
Auth API key + Lambda authorizer + Secrets Manager
Workflow orchestration AWS Step Functions
Website analysis + script generation AWS Lambda + Amazon Bedrock (Claude)
Browser automation + recording Amazon Bedrock AgentCore Browser + Runtime
Narration Amazon Polly + ffmpeg (Lambda layer)
Storage DynamoDB (8 tables) + S3 (4 buckets)
Delivery CloudFront (2 distributions: app + video)
Edge security AWS WAF v2 (managed rule sets + IP rate limit)

The full Step Functions definition lives in infra/lib/stacks/compute-stack.ts.

Prerequisites

  • An AWS account with Bedrock Claude model access enabled in the deployment region (Claude 4 family or any current Claude inference profile)
  • AWS CLI v2 configured with credentials that allow CDK deployment
  • Node.js 20+
  • Python 3.12+
  • Docker Desktop (only required if local Lambda bundling falls back; usually not needed)
  • The bedrock-agentcore-starter-toolkit Python package (the bootstrap script installs this)

Region availability: Amazon Bedrock AgentCore is currently US-only. Default region is us-east-1. To deploy elsewhere, set AWS_REGION and update infra/cdk.json region accordingly.

Quick start

# 1. Configure AWS credentials for your target account
aws configure   # or assume a role via your usual mechanism

# 2. (Optional) override account / region
export AWS_REGION=us-east-1

# 3. Run the bootstrap script — handles everything end-to-end
bash scripts/bootstrap.sh

The bootstrap script will:

  1. Verify prerequisites
  2. cdk bootstrap (if needed)
  3. Build frontend + infra
  4. Deploy all 8 stacks
  5. Create the AgentCore Browser + Runtime
  6. Capture deployment outputs into infra/cdk.json
  7. Re-deploy compute + api + frontend with the populated context
  8. Provision the API key + seed the SHA-256 hash into Secrets Manager
  9. Print the App URL, Video URL, and the API key (the only place it's shown)

Save the API key — it is never logged or persisted by AVDG.

Using the deployed app

Open the App URL in a browser, paste your API key when prompted, and submit a demo:

  • Target URL — any public website
  • Description — "Show me how to sign up", "Walk through the pricing page", etc.

You'll be taken through:

  1. Analysis — AVDG renders the page in a managed browser to understand the DOM
  2. Script — Claude proposes 10-25 steps; you can edit or regenerate
  3. Confirm — kick off the browser execution
  4. Wait — typically 1-3 minutes
  5. Watch — final video plays inline, downloadable from the CDN

You can also drive everything via the REST API:

# Submit
curl -H "x-api-key: $API_KEY" -H "Content-Type: application/json" \
  -X POST $APP_URL/api/demos \
  -d '{"target_url":"https://aws.amazon.com/lambda/","description":"Show key features."}'

# Status
curl -H "x-api-key: $API_KEY" $APP_URL/api/demos/$DEMO_ID/status

# Confirm script (after status reaches AWAITING_CONFIRMATION)
curl -H "x-api-key: $API_KEY" -X POST $APP_URL/api/demos/$DEMO_ID/script/confirm

Configuration

CDK context values in infra/cdk.json (or pass via --context KEY=VALUE):

Key Purpose Default
accountId AWS account ID $CDK_DEFAULT_ACCOUNT from your profile
region AWS region us-east-1
appName Name prefix for all resources avdg
corsAllowedOrigin CloudFront app distribution URL (echoed in API responses) populated by bootstrap
corsAllowedOrigins Same value as a list (used for preflight) populated by bootstrap
videoDistributionDomain CloudFront video distribution domain (without https://) populated by bootstrap
agentCoreBrowserId AgentCore Browser identifier populated by bootstrap
agentCoreRuntimeArn AgentCore Runtime ARN populated by bootstrap
ssrfAllowedHosts Comma-separated hosts whose private IPs are allowed targets empty (deny all)

Cost considerations

This project provisions a non-trivial set of resources. Active costs (when no demos are being generated):

  • AWS WAF v2 Web ACL: ~$5 / month for the ACL existing
  • CloudFront: storage / requests negligible at low volume
  • DynamoDB: PAY_PER_REQUEST, ~$0 at idle
  • Lambda: pay-per-invocation
  • AgentCore Browser: charged per session-second — none if no demos run
  • S3: a few cents per month for at-rest storage of recorded videos

Per-demo cost (1080p, 90-second walkthrough, US East):

  • AgentCore Browser: ~3 minutes session × $0.05/min ≈ $0.15
  • Bedrock Claude (script generation): ~2-5K tokens ≈ $0.01-$0.05
  • Polly (narration): ~1500 characters ≈ $0.01
  • Lambda + Step Functions: <$0.01
  • S3 storage: <$0.01

Rough order: ~$0.20-$0.30 per generated demo at typical volumes.

Always tear down resources you don't need. Use bash scripts/cleanup.sh to destroy everything.

Cleanup

bash scripts/cleanup.sh

This destroys all 8 CloudFormation stacks and removes resources marked RemovalPolicy.RETAIN (DynamoDB tables, the Secrets Manager secret, and versioned S3 objects in the videos bucket). Read the script before running — it asks for confirmation by default, but the deletion is irreversible.

AgentCore Browser and Runtime are not part of CloudFormation; the script prints the manual cleanup commands.

Security

This project includes several defensive measures documented in infra/SECURITY-NOTES.md:

  • API key validation uses constant-time comparison
  • The user identifier is HMAC-derived under a separate salt (so the user_id doesn't reveal the SHA-256 of the API key)
  • Lambda authorizer fails closed (no "anonymous" fallback)
  • SSRF defense rejects target URLs that resolve to private/metadata addresses
  • IAM is scoped to specific resource ARNs (Bedrock model families, Step Functions state machine, AgentCore browser/runtime, etc.)
  • WAF v2 Web ACL with managed rule sets fronts CloudFront
  • The API key hash lives in Secrets Manager — rotation propagates within ~5 minutes without redeploys

To report security issues, see SECURITY.md.

Project structure

.
├── infra/                          CDK (TypeScript)
│   ├── bin/app.ts                  Stack composition
│   └── lib/stacks/                 8 stacks (storage, compute, api, cdn, ...)
├── packages/
│   ├── api/                        REST + WebSocket Lambda handlers (Python)
│   ├── analyzer/                   Website analysis (Python + AgentCore Browser)
│   ├── script_generator/           Claude prompt + step builder (Python)
│   ├── browser_automation/         AgentCore Runtime agent (Python + Playwright)
│   ├── narration/                  Polly synth + ffmpeg muxing (Python)
│   └── frontend/                   React SPA (Vite + Tailwind)
├── scripts/
│   ├── bootstrap.sh                One-shot deploy
│   ├── cleanup.sh                  One-shot teardown
│   ├── setup-agentcore.sh          Used by bootstrap
│   ├── security-scan.sh            Bandit + npm audit + pip-audit + secrets
│   ├── build.sh                    Manual build steps
│   ├── deploy.sh                   Manual `cdk deploy --all`
│   └── test.sh                     Run all unit tests
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE                         MIT-0
├── NOTICE
├── README.md                       (this file)
└── SECURITY.md

Development

# Python backend tests
python -m venv .venv && source .venv/bin/activate
pip install -r requirements-dev.txt
for pkg in api analyzer script_generator narration browser_automation; do
  pip install -r packages/$pkg/requirements.txt
done
pytest

# Frontend tests
(cd packages/frontend && npm install && npm test)

# Infra tests
(cd infra && npm install && npm test)

# Run security scan
bash scripts/security-scan.sh

License

This project is licensed under the MIT-0 License.

About

A system that generates recorded browser session videos from public webpages, based on a webpage URL and the description of the needed clickthrough recording.

Topics

agentcore-browseragentcore-runtimeamazon-bedrockawsbedrockcdkdemolambdaserverlessvideo

Resources

Readme
MIT-0 license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

2 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

Generated from amazon-archives/__template_MIT-0
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.