Skip to main content

Scenarios Microsite

Last Updated: 2026-03-06 Source: https://github.com/co-cddo/ndx_try_aws_scenarios Captured SHA: 27b3a06

Executive Summary

The NDX Try AWS Scenarios microsite is a static website built with Eleventy v3.x that showcases pre-built AWS scenario CloudFormation templates for UK local government evaluation. The site provides scenario discovery (with quiz-based recommendation), CloudFormation Quick Create deployment URLs, step-by-step walkthroughs, and evidence pack generation. All scenarios deploy to us-east-1, are validated at build time against JSON schemas using AJV, and integrate with the Innovation Sandbox deployer for automatic provisioning on lease approval.

Architecture Overview

Scenarios Catalogue

The site features 7 production-ready scenarios defined in src/_data/scenarios.yaml, validated against schemas/scenario.schema.json at build time.

ScenarioIDDifficultyTimeRegionAWS Services
LocalGov Drupal with AIlocalgov-drupalBeginner40 minus-east-1Bedrock, Polly, Translate, Textract, Fargate, Aurora, EFS
Council Chatbotcouncil-chatbotBeginner15 minus-east-1Bedrock, Lambda, S3
Planning AIplanning-aiIntermediate30 minus-east-1Bedrock, Textract, S3
FOI Redactionfoi-redactionIntermediate25 minus-east-1Bedrock, Comprehend, S3
Smart Car Parksmart-car-parkAdvanced45 minus-east-1IoT Core, Lambda, DynamoDB, QuickSight
Text to Speechtext-to-speechBeginner15 minus-east-1Polly, S3, CloudFront
QuickSight Dashboardquicksight-dashboardIntermediate30 minus-east-1QuickSight, Athena, S3, Glue

Each scenario includes detailed metadata: business outcomes, prerequisites, skill tags, related scenarios, success metrics with ROI projections, security posture, and total cost of ownership projections.

Scenario Data Model

Each scenario in scenarios.yaml follows a comprehensive schema:

- id: "council-chatbot" # URL-safe identifier
name: "Council Chatbot" # Display name
headline: "..." # One-line summary
bestFor: "..." # Target use case
description: "..." # Full description
difficulty: "beginner" # beginner | intermediate | advanced
timeEstimate: "15 minutes" # Human-readable estimate
primaryPersona: "service-manager" # service-manager | technical | finance | leadership
isMostPopular: true # Featured badge
featured: true # Show on homepage
status: "active" # active | coming-soon | archived
deployment:
templateUrl: "https://..." # S3 HTTPS URL for CloudFormation
templateS3Url: "s3://..." # S3 protocol URL
region: "us-east-1" # Deployment region
stackNamePrefix: "ndx-try-..." # Max 114 chars (128 - timestamp)
parameters: [...] # CloudFormation parameters
capabilities: [CAPABILITY_IAM, ...] # Required capabilities
deploymentTime: "3 to 5 minutes" # Realistic estimate
deploymentPhases: [...] # Phase descriptions
outputs: [...] # Expected stack outputs
success_metrics:
roi:
annual_savings: 40000 # GBP
payback_months: 2
committee_language: "..." # Ready-made summary for reports
security_posture:
certifications: [...] # ISO 27001, SOC 2, etc.
data_residency: "US (us-east-1)"
encryption: "AES-256 at rest, TLS 1.3 in transit"

Eleventy Configuration

File: repos/ndx_try_aws_scenarios/eleventy.config.js (265 lines)

GOV.UK Plugin Setup

Uses @x-govuk/govuk-eleventy-plugin v8.3.1 with the GOV.UK rebrand enabled. The site is branded as "NDX:Try AWS Scenarios" in Alpha phase.

SettingValue
Product NameNDX:Try AWS Scenarios
PhaseAlpha
Stylesheets/assets/application.css, /assets/css/custom.css
URLhttps://aws.try.ndx.digital.cabinet-office.gov.uk
Path PrefixGITHUB_PAGES_PATH_PREFIX env var or /

Data Handling

YAML data files are loaded via js-yaml through a custom data extension. The site uses Nunjucks for all template engines.

Custom Filters

FilterPurpose
findScenarioByIdLook up scenario by ID from the scenarios array
capitalizeCapitalize first character
difficultyColorMap difficulty to GOV.UK tag colour (green/yellow/red)
personaColorMap persona to tag colour (blue/purple/turquoise/orange)
categoryColorMap category to tag colour (blue/green/purple)
scenarioCategoryDerive category (ai/iot/analytics) from scenario tags
walkthroughStepsReturn step count for a scenario (currently hardcoded to 4)
slugURL-safe slug generation
regionNameMap AWS region codes to friendly names (e.g., us-east-1 to N. Virginia)
deployUrlGenerate CloudFormation Quick Create URL from scenario deployment config
getRelatedScenariosCross-link related scenarios
readableDateHuman-readable date formatting (en-GB)
isAllowedReturnUrlValidate return URLs against allowlist

CloudFormation Deploy URL Generation

The deployUrl filter constructs a CloudFormation Quick Create URL:

https://console.aws.amazon.com/cloudformation/home?region={region}#/stacks/quickcreate
?templateURL={encoded-s3-url}
&stackName={prefix}-{timestamp}
&param_Environment=sandbox
&param_KnowledgeBaseSource=council-sample-data

Validation applied:

  • Parameter names must match `^[a-zA-Z][a-zA-Z0-9-]*# Scenarios Microsite

Last Updated: 2026-03-06 Source: https://github.com/co-cddo/ndx_try_aws_scenarios Captured SHA: 27b3a06

Executive Summary

The NDX Try AWS Scenarios microsite is a static website built with Eleventy v3.x that showcases pre-built AWS scenario CloudFormation templates for UK local government evaluation. The site provides scenario discovery (with quiz-based recommendation), CloudFormation Quick Create deployment URLs, step-by-step walkthroughs, and evidence pack generation. All scenarios deploy to us-east-1, are validated at build time against JSON schemas using AJV, and integrate with the Innovation Sandbox deployer for automatic provisioning on lease approval.

Architecture Overview

CODE_BLOCK_0

Scenarios Catalogue

The site features 7 production-ready scenarios defined in src/_data/scenarios.yaml, validated against schemas/scenario.schema.json at build time.

ScenarioIDDifficultyTimeRegionAWS Services
LocalGov Drupal with AIlocalgov-drupalBeginner40 minus-east-1Bedrock, Polly, Translate, Textract, Fargate, Aurora, EFS
Council Chatbotcouncil-chatbotBeginner15 minus-east-1Bedrock, Lambda, S3
Planning AIplanning-aiIntermediate30 minus-east-1Bedrock, Textract, S3
FOI Redactionfoi-redactionIntermediate25 minus-east-1Bedrock, Comprehend, S3
Smart Car Parksmart-car-parkAdvanced45 minus-east-1IoT Core, Lambda, DynamoDB, QuickSight
Text to Speechtext-to-speechBeginner15 minus-east-1Polly, S3, CloudFront
QuickSight Dashboardquicksight-dashboardIntermediate30 minus-east-1QuickSight, Athena, S3, Glue

Each scenario includes detailed metadata: business outcomes, prerequisites, skill tags, related scenarios, success metrics with ROI projections, security posture, and total cost of ownership projections.

Scenario Data Model

Each scenario in scenarios.yaml follows a comprehensive schema:

CODE_BLOCK_1

Eleventy Configuration

File: repos/ndx_try_aws_scenarios/eleventy.config.js (265 lines)

GOV.UK Plugin Setup

Uses @x-govuk/govuk-eleventy-plugin v8.3.1 with the GOV.UK rebrand enabled. The site is branded as "NDX:Try AWS Scenarios" in Alpha phase.

SettingValue
Product NameNDX:Try AWS Scenarios
PhaseAlpha
Stylesheets/assets/application.css, /assets/css/custom.css
URLhttps://aws.try.ndx.digital.cabinet-office.gov.uk
Path PrefixGITHUB_PAGES_PATH_PREFIX env var or /

Data Handling

YAML data files are loaded via js-yaml through a custom data extension. The site uses Nunjucks for all template engines.

Custom Filters

FilterPurpose
findScenarioByIdLook up scenario by ID from the scenarios array
capitalizeCapitalize first character
difficultyColorMap difficulty to GOV.UK tag colour (green/yellow/red)
personaColorMap persona to tag colour (blue/purple/turquoise/orange)
categoryColorMap category to tag colour (blue/green/purple)
scenarioCategoryDerive category (ai/iot/analytics) from scenario tags
walkthroughStepsReturn step count for a scenario (currently hardcoded to 4)
slugURL-safe slug generation
regionNameMap AWS region codes to friendly names (e.g., us-east-1 to N. Virginia)
deployUrlGenerate CloudFormation Quick Create URL from scenario deployment config
getRelatedScenariosCross-link related scenarios
readableDateHuman-readable date formatting (en-GB)
isAllowedReturnUrlValidate return URLs against allowlist

CloudFormation Deploy URL Generation

The deployUrl filter constructs a CloudFormation Quick Create URL:

CODE_BLOCK_2

Validation applied:

  • Parameter names must match and be under 255 characters
  • Parameter values must be under 4096 characters
  • Stack name prefix truncated to ensure total name stays under 128 characters

Return URL Allowlist

Only URLs matching these domains are accepted as return URLs:

  • localhost, 127.0.0.1 (development)
  • ndx-try.service.gov.uk (production)
  • github.io (GitHub Pages)

Project Structure

ndx_try_aws_scenarios/
├── src/
│ ├── _data/ # YAML data files
│ │ ├── scenarios.yaml # 7 scenario definitions (45KB)
│ │ ├── site.yaml # Global site config
│ │ ├── quizConfig.yaml # Scenario recommendation quiz
│ │ ├── walkthroughs.yaml # Walkthrough step definitions
│ │ ├── navigation.yaml # Site navigation
│ │ ├── phaseConfig.yaml # Phase configuration
│ │ ├── pathways.yaml # User pathways
│ │ ├── forms.yaml # Form definitions
│ │ ├── chatbot-sample-questions.yaml
│ │ ├── foi-sample-documents.yaml
│ │ ├── planning-sample-documents.yaml
│ │ ├── quicksight-sample-data.yaml
│ │ ├── smart-car-park-sample-data.yaml
│ │ ├── text-to-speech-sample-data.yaml
│ │ ├── evidence-pack-sample.yaml
│ │ ├── success-stories.yaml
│ │ ├── sample-data-config.yaml
│ │ ├── exploration/ # Per-scenario exploration guides
│ │ ├── experiments/ # Experiment definitions
│ │ ├── extend/ # Extension guides
│ │ ├── architecture/ # Architecture data
│ │ └── screenshots/ # Screenshot metadata per scenario
│ ├── _includes/ # Nunjucks templates
│ ├── assets/ # CSS, images
│ ├── lib/ # Client-side JavaScript modules
│ ├── scenarios/ # Scenario detail pages
│ └── walkthroughs/ # Walkthrough pages
├── cloudformation/
│ ├── scenarios/ # Per-scenario CloudFormation templates
│ │ ├── council-chatbot/
│ │ ├── foi-redaction/
│ │ ├── localgov-drupal/ # CDK-based (includes cdk/ subdirectory)
│ │ ├── planning-ai/
│ │ ├── quicksight-dashboard/
│ │ ├── smart-car-park/
│ │ └── text-to-speech/
│ ├── functions/ # Shared Lambda functions
│ │ └── sample-data-seeder/ # Seeds sample data on deployment
│ ├── isb-hub/ # ISB hub CDK stack
│ └── screenshot-automation/ # Playwright screenshot pipeline
├── schemas/ # JSON schemas for validation
│ ├── scenario.schema.json # Scenario data schema (25KB)
│ ├── quiz-config.schema.json # Quiz config schema
│ └── sample-data.schema.json # Sample data schema
├── scripts/ # Build and utility scripts
│ ├── validate-schema.js # AJV schema validation
│ ├── optimize-images.js # Image optimization
│ ├── run-accessibility-tests.js # Pa11y runner
│ ├── generate-manifest.mjs # Manifest generation
│ ├── check-screenshots.js # Screenshot validation
│ └── verify-reference-stack.mjs # Stack verification
└── tests/ # Test files

Schema Validation

File: repos/ndx_try_aws_scenarios/scripts/validate-schema.js (218 lines)

Build-time validation runs before Eleventy build (npm run build executes validate:schema && eleventy).

Validated Schemas

SchemaData FilePurpose
scenario.schema.json (25KB)scenarios.yamlFull scenario metadata validation
quiz-config.schema.json (4KB)quizConfig.yamlQuiz question/option validation
sample-data.schema.json (7KB)Sample data filesSample data structure validation

Validation Engine

Uses AJV (Another JSON Validator) with ajv-formats for URI and date validation. Errors are output with actionable guidance:

[1]
- Path: /scenarios/0/deployment
Error: must have required property 'templateUrl'
ACTION: Add missing field "templateUrl"

CloudFormation Templates

Templates are hosted on S3 at ndx-try-templates-us-east-1 in us-east-1.

Template Distribution

Scenario Template Structures

Most scenarios use plain CloudFormation YAML templates. The LocalGov Drupal scenario is the exception, using a full CDK stack with TypeScript constructs:

LocalGov Drupal CDK Stack (cloudformation/scenarios/localgov-drupal/cdk/):

  • lib/constructs/networking.ts: VPC, subnets, NAT Gateway
  • lib/constructs/compute.ts: ECS Fargate service, ALB, task definition
  • lib/constructs/database.ts: Aurora Serverless v2 MySQL
  • lib/constructs/storage.ts: EFS, S3 bucket
  • lib/constructs/cloudfront.ts: CloudFront distribution, WAF, OAC

Sample Data Seeder

Directory: cloudformation/functions/sample-data-seeder/

A Python Lambda function deployed alongside scenarios to seed realistic sample data (council service data, chatbot knowledge bases, etc.) into the deployed resources. Includes its own CloudFormation template and deploy script.

ISB Hub Stack

Directory: cloudformation/isb-hub/

A CDK project that deploys supporting infrastructure in the ISB hub account for scenario management.

ISB Deployer Integration

When a lease is approved in the Innovation Sandbox, the deployer Lambda:

  1. Receives LeaseApproved event with templateUrl pointing to this repo
  2. Performs sparse clone from GitHub
  3. Detects CDK vs CloudFormation (checks for cdk.json)
  4. For CDK scenarios: runs npm ci --ignore-scripts then cdk synth
  5. Creates CloudFormation stack in the sandbox account
  6. Polls for completion and publishes DeploymentComplete event

See 23-deployer.md for full deployer architecture.

Testing Strategy

Test Configuration

Vitest (vitest.config.ts):

  • Environment: Node
  • Includes: tests/unit/**/*.test.ts, tests/integration/**/*.test.ts
  • Coverage: V8 provider, reports in text/json/html

Playwright (playwright.config.ts):

  • Projects: Desktop Chrome (1280x800) and Mobile iPhone SE (375x667)
  • Web server: npx http-server _site -p 8080
  • Retries: 2 in CI, 0 locally
  • Workers: 1 in CI (deterministic), auto locally
  • Screenshot diff: 10% pixel ratio threshold

Test Types

TypeCommandToolPurpose
Schema Validationnpm run validate:schemaAJVValidate scenarios.yaml at build
Unit Testsnpm testVitestData transformation, filter logic
Integration Testsnpm run test:unitVitestCross-module integration
Accessibilitynpm run test:a11yPa11y CIWCAG 2.2 AA compliance
Full A11y Auditnpm run test:a11y:fullCustom Pa11y runnerExtended accessibility testing
Lighthousenpm run test:lighthouseLighthouse CIPerformance metrics
Screenshot Capturenpm run test:screenshotsPlaywrightAutomated screenshots
Visual Regressionnpm run test:visualPlaywright + pixelmatchVisual diff testing
Drupal Screenshotsnpm run test:drupal-screenshotsPlaywrightDrupal-specific captures
E2E Testsnpm run test:playwrightPlaywrightFull end-to-end flows

Lighthouse Configuration

File: repos/ndx_try_aws_scenarios/lighthouserc.js

Lighthouse CI is configured for automated performance auditing as part of the build pipeline.

CI/CD Pipeline

GitHub Actions Workflows

WorkflowTriggerPurpose
build-deploy.ymlPush to mainBuild site, deploy to GitHub Pages
deploy-blueprints.ymlPush to main (cloudformation changes)Upload templates to S3
docker-build.ymlPush to mainBuild Docker containers (for Drupal scenario)

Deployment Targets

AssetDestinationMethod
Static siteGitHub Pagesbuild-deploy.yml
CloudFormation templatesS3 ndx-try-templates-us-east-1deploy-blueprints.yml
Docker imagesContainer registrydocker-build.yml

Site Configuration

File: repos/ndx_try_aws_scenarios/src/_data/site.yaml

SettingValue
NameNDX:Try AWS
URLhttps://aws.try.ndx.digital.cabinet-office.gov.uk
AccessibilityWCAG 2.2 AA
LicenseMIT (Open Government Licence v3.0 for content)
Contactndx@dsit.gov.uk

Feature Flags:

  • quizEnabled: true (scenario recommendation quiz active)
  • evidencePackEnabled: false (evidence pack generation not yet in production)
  • analyticsEnabled: false (Google Analytics not yet active)

Trust Indicators displayed on the site:

  • 50+ councils engaged
  • 15 minutes to first insight
  • Zero commitment, zero cost

Dependencies

PackageVersionPurpose
@11ty/eleventy^3.0.0Static site generator
@x-govuk/govuk-eleventy-plugin^8.3.1GOV.UK Design System integration
govuk-frontend6.1.0GOV.UK Frontend components
jspdf^4.2.0Client-side PDF evidence pack generation
ajv / ajv-formats^8.18.0 / ^3.0.1JSON schema validation
@playwright/test^1.58.2E2E and visual testing
vitest^4.0.18Unit and integration testing
pa11y-ci^4.0.1Accessibility testing
@lhci/cli^0.15.1Lighthouse CI
sharp^0.34.5Image optimization
pixelmatch / pngjs^7.1.0 / ^7.0.0Visual regression testing

Node.js requirement: >= 22.0.0

Source Files Referenced

File PathPurposeSize
repos/ndx_try_aws_scenarios/eleventy.config.jsEleventy configuration with filters265 lines
repos/ndx_try_aws_scenarios/package.jsonDependencies and scripts69 lines
repos/ndx_try_aws_scenarios/src/_data/scenarios.yaml7 scenario definitions45KB
repos/ndx_try_aws_scenarios/src/_data/site.yamlGlobal site configuration67 lines
repos/ndx_try_aws_scenarios/schemas/scenario.schema.jsonScenario validation schema25KB
repos/ndx_try_aws_scenarios/schemas/quiz-config.schema.jsonQuiz validation schema4KB
repos/ndx_try_aws_scenarios/scripts/validate-schema.jsBuild-time schema validation218 lines
repos/ndx_try_aws_scenarios/vitest.config.tsUnit test configuration15 lines
repos/ndx_try_aws_scenarios/playwright.config.tsE2E test configuration55 lines
repos/ndx_try_aws_scenarios/lighthouserc.jsLighthouse CI configuration-
repos/ndx_try_aws_scenarios/cloudformation/scenarios/7 scenario CloudFormation templates275+ files
repos/ndx_try_aws_scenarios/cloudformation/isb-hub/ISB hub CDK stack6 files
repos/ndx_try_aws_scenarios/cloudformation/functions/sample-data-seeder/Sample data Lambda4 files

Generated from source analysis. See 00-repo-inventory.md for full inventory.