Skip to main content

External Integrations

Last Updated: 2026-03-06 Sources: repos/innovation-sandbox-on-aws-approver, repos/innovation-sandbox-on-aws-costs, repos/innovation-sandbox-on-aws-deployer, repos/innovation-sandbox-on-aws-billing-seperator, .state/discovered-accounts.json, .state/org-ous.json

Executive Summary

The NDX:Try AWS platform integrates with multiple external systems beyond the core ISB infrastructure. These integrations span AWS-native services (Cost Explorer, Bedrock, Identity Center, Organizations), third-party APIs (GitHub), and cross-organizational data sources (ukps-domains for UK public sector domain whitelisting). Each integration has distinct authentication patterns, failure modes, and data exchange contracts.


Integration Map


Integration 1: ukps-domains (Domain Whitelist)

Overview

PropertyValue
Repositorygovuk-digital-backbone/ukps-domains
PurposeAuthoritative list of UK public sector email domains
OwnerGDS (Government Digital Service)
ConsumerApprover system (domain verification rule)
Update FrequencyWeekly (manual)

Data Flow

Data Format

{
"domains": [
{"domain": "gov.uk", "organisation": "UK Government", "category": "central_government"},
{"domain": "nhs.uk", "organisation": "National Health Service", "category": "nhs"},
{"domain": "police.uk", "organisation": "UK Police Forces", "category": "police"}
],
"lastUpdated": "2026-01-15T10:00:00Z",
"version": "2.3.1"
}

Failure Modes

FailureImpactMitigation
ukps-domains repo unavailableCannot update whitelistUse cached S3 version
S3 bucket inaccessibleAll domain checks failCloudWatch alarm, fallback list
Stale domain listLegitimate new domains rejectedWeekly update SLA

Integration 2: AWS Cost Explorer API

Overview

PropertyValue
ServiceAWS Cost Explorer
PurposeRetrieve actual AWS spend for sandbox accounts
AuthenticationIAM role assumption (Hub to Org Mgmt)
Rate Limits100 requests/hour, 5 TPS
Data Lag24-48 hours
Regionus-east-1 (Cost Explorer endpoint)

Cross-Account Access Pattern

Rate Limiting Strategy

The innovation-sandbox-on-aws-costs repository uses @aws-sdk/client-cost-explorer v3.995.0 with the following mitigations:

  1. Batch Queries: Query multiple accounts in a single request using LINKED_ACCOUNT dimension filter
  2. Reserved Concurrency: Lambda limited to prevent parallel Cost Explorer bursts
  3. Exponential Backoff: Retry on ThrottlingException
  4. Caching: Never re-query same lease/date range (check DynamoDB first)

Failure Modes

FailureImpactMitigation
Cost Explorer unavailableCost collection failsSQS DLQ, manual retry
Throttling (> 100 req/h)Delayed cost dataQueue processing, backoff
Data lag > 72 hoursBilling separator forces releaseAlert ops, estimate costs
Incorrect cost dataBudget compliance errorsSanity checks (cost vs duration)

Integration 3: AWS Identity Center (SSO)

Overview

PropertyValue
ServiceAWS IAM Identity Center
PurposeUser authentication and account access provisioning
AuthenticationIAM role with sso:*, identitystore:*
Identity StoreConfigured via ISB IDC Stack
ConsumerLifecycle Manager Lambda

Integration Points

1. User Authentication (ISB Frontend)

User -> Cognito User Pool -> Identity Center -> SAML assertion -> JWT token

2. Permission Set Assignment (on lease approval)

Lifecycle Manager -> Identity Center -> CreateAccountAssignment
TargetId: pool account ID
PrincipalType: USER
PermissionSetArn: IsbUserPermissionSet

3. Permission Set Revocation (on lease termination)

Lifecycle Manager -> Identity Center -> DeleteAccountAssignment
TargetId: pool account ID
PrincipalType: USER

Event Flow

Failure Modes

FailureImpactMitigation
Identity Center unavailableCannot provision accessRetry with exponential backoff
Permission set not foundAccess grant failsFallback to default permission set
User not in Identity StoreCannot create leaseValidate user before lease creation
SAML assertion expiredRe-authentication requiredToken refresh flow

Integration 4: Amazon Bedrock AI

Overview

PropertyValue
ServiceAmazon Bedrock
ModelClaude 3 Sonnet (anthropic.claude-3-sonnet-20240229-v1:0)
PurposeAI-enhanced risk assessment for lease approvals
Regionus-east-1 (Bedrock model availability)
ConsumerApprover Lambda (rules R09, R16, R19)
Cost~$0.005-0.01 per approval

API Usage

The Approver uses @aws-sdk/client-bedrock-runtime v3.987.0 to invoke Claude 3 Sonnet for three scoring rules:

  • R09 Justification Quality: Evaluates the business case text
  • R16 Anomaly Detection: Identifies unusual request patterns
  • R19 Holistic Risk: Overall risk scoring with context

Cost Profile

MetricValue
Input tokens per request~400
Output tokens per request~80
Cost per request~$0.0024
Monthly cost (1000 approvals)~$2.40

Data Privacy

  • Bedrock configured to NOT retain data for training
  • Justification text may contain PII (names, emails)
  • API version bedrock-2023-05-31 ensures no data retention

Failure Modes

FailureImpactMitigation
Bedrock unavailableAI rules return neutral score (50)Fallback scoring, manual review triggered
Model throttlingDelayed approvalRetry with backoff, queue requests
Malformed responseCannot parse JSONDefault to manual review
High latency (>30s)Lambda timeoutAdjusted Lambda timeout, async processing

Integration 5: GitHub API (Deployment)

Overview

PropertyValue
ServiceGitHub REST API v3
PurposeFetch CloudFormation templates and CDK projects
AuthenticationPersonal Access Token (Secrets Manager)
Rate Limit5000 requests/hour (authenticated)
ConsumerDeployer Lambda

API Usage

The Deployer (innovation-sandbox-on-aws-deployer) uses @aws-sdk/client-secrets-manager v3.993.0 to retrieve the GitHub token, then:

  1. CDK Detection: Check for cdk.json in the repository
  2. Sparse Clone: For CDK projects, clone only the required path
  3. Template Fetch: For CloudFormation, download the template YAML directly

Authentication

Secrets Manager -> "github-deployer-token" -> ghp_xxxxxxxxxxxx

The Deployer also uses @aws-sdk/client-ssm for parameter store lookups for ISB API configuration used by the @co-cddo/isb-client library.

Failure Modes

FailureImpactMitigation
GitHub unavailableDeployment failsRetry 3x, fallback to cached templates
Rate limit exceededThrottled requestsExponential backoff, queue
Token expired401 UnauthorizedCloudWatch alarm, rotate token
Template not found404 errorValidate template path in lease template
Large repositoryClone timeoutSparse checkout, shallow clone

Integration 6: AWS Organizations

Overview

PropertyValue
ServiceAWS Organizations
PurposeAccount lifecycle management (OU moves)
AuthenticationIAM role in Hub account
ConsumerLifecycle Manager, Billing Separator

OU Move Operations

The Billing Separator (@aws-sdk/client-organizations v3.1000.0) performs OU moves as part of the account lifecycle:

Available OU -> Active OU (on lease approval)
Active OU -> CleanUp OU (on lease termination)
CleanUp OU -> Available OU (after successful cleanup)
CleanUp OU -> Quarantine OU (after cleanup failure)

Current OU Structure (from .state/org-ous.json)

OU NameOU IDPurpose
InnovationSandboxou-2laj-lha5vsamParent for ISB resources
ndx_InnovationSandboxAccountPoolou-2laj-4dyae1oaPool account parent
Infrastructureou-2laj-40z2mrlgNetwork, Perimeter, SharedServices
Securityou-2laj-8q61vv13Audit, LogArchive
Workloadsou-2laj-4t1kuxouInnovationSandboxHub
Suspendedou-2laj-vn184pt1Deactivated accounts

Integration 7: @co-cddo/isb-client (Shared API Client)

Overview

PropertyValue
Package@co-cddo/isb-client
PurposeShared TypeScript client for ISB API
DistributionGitHub Releases (tarball)
ConsumersApprover, Costs, Deployer

Version Distribution

ConsumerClient VersionDistribution URL
Approverv2.0.1github.com/co-cddo/innovation-sandbox-on-aws-client/releases/download/v2.0.1/...
Costsv2.0.0github.com/co-cddo/innovation-sandbox-on-aws-client/releases/download/v2.0.0/...
Deployerv2.0.0github.com/co-cddo/innovation-sandbox-on-aws-client/releases/download/v2.0.0/...

This client wraps the ISB API Gateway with typed methods for lease operations, account queries, and template lookups, using @aws-sdk/client-secrets-manager v3.992.0 for API key retrieval.


Security Considerations

Authentication Methods

SystemMethodCredential StorageRotation
ukps-domainsNone (public repo)N/AN/A
Cost ExplorerIAM role assumptionN/A (temporary)Automatic
Identity CenterIAM roleN/A (temporary)Automatic
BedrockIAM roleN/A (temporary)Automatic
GitHub APIPersonal Access TokenSecrets ManagerManual (annual)
OrganizationsIAM roleN/A (temporary)Automatic

Network Security

Current Setup:

  • Lambda functions use NAT Gateway for internet access (GitHub API calls)
  • AWS service calls (Bedrock, Cost Explorer, etc.) traverse the AWS backbone
  • No VPC endpoints currently deployed for AWS services

Recommended VPC Endpoints:

- com.amazonaws.us-east-1.bedrock-runtime
- com.amazonaws.us-east-1.ce
- com.amazonaws.us-east-1.secretsmanager

Monitoring & Alerting

CloudWatch Metrics

IntegrationMetricAlarm Threshold
Cost ExplorerCostExplorerLatency> 30s
Cost ExplorerCostExplorerThrottles> 5/hour
BedrockBedrockLatency> 10s
BedrockBedrockErrors> 5%
GitHubGitHubAPIErrors> 10/hour
Identity CenterPermissionSetAssignmentFailures> 5/hour

References


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