Skip to main content

Encryption

Last Updated: 2026-03-06 Sources: innovation-sandbox-on-aws (kms.ts, isb-data-resources.ts, cloudfront-ui-api.ts, auth-api.ts, rest-api-all.ts), innovation-sandbox-on-aws-costs, ndx-try-aws-lza (security-config.yaml)

Executive Summary

The NDX:Try AWS platform enforces encryption at rest using customer-managed AWS KMS keys for all sensitive data stores (DynamoDB, Secrets Manager, S3 frontend and logging buckets) and encryption in transit using TLS 1.2+ across all network paths. KMS keys are per-stack singletons with automatic annual rotation enabled, and S3 buckets universally enforce SSL via bucket policies. The Landing Zone Accelerator additionally enforces EBS default volume encryption and S3 public access blocks across the entire organization.


Encryption Architecture Overview


1. KMS Key Management

Key Architecture

The ISB uses a singleton pattern for KMS keys, creating one key per CDK stack per namespace:

export class IsbKmsKeys {
private static instances: { [key: string]: Key } = {};
public static get(scope: Construct, namespace: string, keyId?: string): Key {
const isbKeyId = keyId ?? Stack.of(scope).stackName;
if (!IsbKmsKeys.instances[isbKeyId]) {
IsbKmsKeys.instances[isbKeyId] = new Key(Stack.of(scope), `IsbKmsKey-${isbKeyId}`, {
enableKeyRotation: true,
description: `Encryption Key for Innovation Sandbox: ${isbKeyId}`,
alias: `AwsSolutions/InnovationSandbox/${namespace}/${isbKeyId}`,
removalPolicy: isDevMode(scope) ? RemovalPolicy.DESTROY : RemovalPolicy.RETAIN,
});
}
return IsbKmsKeys.instances[isbKeyId]!;
}
}

Source: infrastructure/lib/components/kms.ts

Key Properties

PropertyValue
Alias PatternAwsSolutions/InnovationSandbox/<namespace>/<stackName>
Automatic RotationEnabled (annual, managed by AWS)
Removal PolicyRETAIN in production, DESTROY in dev mode
DescriptionEncryption Key for Innovation Sandbox: <stackName>

Key Grants

KMS key policies grant access to specific AWS services and IAM principals:

GranteeActionsContext
SSO Handler Lambdakms:Encrypt, kms:DecryptJWT/IdP cert decryption
Authorizer Lambdakms:Encrypt, kms:DecryptJWT secret decryption
logs.amazonaws.comkms:Encrypt, kms:Decrypt, kms:GenerateDataKey*CloudWatch log encryption
delivery.logs.amazonaws.comkms:Encrypt, kms:Decrypt, kms:GenerateDataKey*CloudFront access log delivery
cloudfront.amazonaws.coms3:GetObject (via bucket policy)Origin access to encrypted S3

2. DynamoDB Encryption

All three DynamoDB tables use customer-managed KMS encryption with point-in-time recovery:

TablePartition KeySort KeyEncryptionPITRDeletion Protection
SandboxAccountTableawsAccountId (S)-CUSTOMER_MANAGED KMSYesYes (prod)
LeaseTemplateTableuuid (S)-CUSTOMER_MANAGED KMSYesYes (prod)
LeaseTableuserEmail (S)uuid (S)CUSTOMER_MANAGED KMSYesYes (prod)

CDK Configuration:

new Table(scope, 'SandboxAccountTable', {
encryptionKey: this.tableKmsKey,
encryption: TableEncryption.CUSTOMER_MANAGED,
pointInTimeRecoverySpecification: { pointInTimeRecoveryEnabled: true },
deletionProtection: !devMode,
billingMode: BillingMode.PAY_PER_REQUEST,
});

Encryption Coverage:

  • All table data, indexes (including GSI StatusIndex on LeaseTable), and backups are encrypted with the same customer-managed key
  • Point-in-time recovery provides continuous backups for 35 days
  • The tableKmsKeyId is shared via SSM Parameter Store for cross-stack access

Source: isb-data-resources.ts lines 43-84


3. S3 Bucket Encryption

Frontend Bucket

PropertyValue
EncryptionBucketEncryption.KMS (customer-managed)
Block Public AccessBLOCK_ALL
Enforce SSLtrue
VersioningEnabled
Object OwnershipOBJECT_WRITER

Source: cloudfront-ui-api.ts lines 100-111

Access Logs Bucket

PropertyValue
EncryptionBucketEncryption.KMS (customer-managed)
Block Public AccessBLOCK_ALL
Enforce SSLtrue
VersioningDisabled (access logs do not need versioning)
LifecycleTransition to Glacier after configurable days; expiry after configurable retention

Source: cloudfront-ui-api.ts lines 113-144

SSL Enforcement

All S3 buckets set enforceSSL: true in CDK, which automatically adds a bucket policy statement denying any s3:* action when aws:SecureTransport is false. This ensures that all access to bucket contents occurs over HTTPS.


4. Secrets Manager Encryption

All secrets in AWS Secrets Manager are encrypted with the same customer-managed KMS key used by DynamoDB:

SecretEncryption
/isb/<namespace>/Auth/JwtSecretCustomer-managed KMS
/isb/<namespace>/Auth/IdpCertCustomer-managed KMS

The KMS key is passed explicitly to the Secret construct:

const jwtTokenSecret = new Secret(scope, "JwtSecret", {
encryptionKey: kmsKey,
generateSecretString: { passwordLength: 32 },
});

Source: auth-api.ts lines 45-55


5. TLS / Transport Encryption

CloudFront Distribution

PropertyValue
Minimum Protocol VersionSecurityPolicyProtocol.TLS_V1_2_2019
Viewer Protocol PolicyREDIRECT_TO_HTTPS
HTTP VersionHTTP/2
IPv6Disabled

Source: cloudfront-ui-api.ts lines 274-314

Security Response Headers

CloudFront adds the following security headers to all responses:

HeaderValue
Strict-Transport-Securitymax-age=46656000; includeSubDomains (540 days)
X-Content-Type-Optionsnosniff
X-Frame-OptionsDENY
Referrer-Policyno-referrer
Content-Security-Policyupgrade-insecure-requests; default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self' data:; font-src 'self' data:; connect-src 'self'; manifest-src 'self'; frame-ancestors 'none'; base-uri 'none'; object-src 'none'
Cache-Controlno-store, no-cache

Source: cloudfront-ui-api.ts lines 160-208

API Gateway

PropertyValue
Minimum TLS VersionTLS 1.2 (AWS default for regional endpoints)
TracingEnabled (X-Ray)
ThrottlingConfigurable rate and burst limits via CDK context

Lambda to AWS Services

All Lambda functions use the AWS SDK v3, which enforces HTTPS by default for all service API calls. No custom transport configuration is needed.


6. Organization-Wide Encryption Controls (LZA)

The Landing Zone Accelerator enforces encryption controls across the entire AWS Organization:

EBS Default Encryption

ebsDefaultVolumeEncryption:
enable: true
excludeRegions: []

All EBS volumes created in any account are encrypted by default.

S3 Public Access Block

s3PublicAccessBlock:
enable: true
excludeAccounts: []

Public access is blocked at the account level for all accounts in the organization.

AWS Config Rules for Encryption

The LZA deploys Config rules that check encryption compliance:

Config RuleResource TypePurpose
dynamodb-table-encrypted-kmsAWS::DynamoDB::TableVerifies DynamoDB tables use KMS encryption
secretsmanager-using-cmkAWS::SecretsManager::SecretVerifies secrets use customer-managed keys
codebuild-project-artifact-encryptionAWS::CodeBuild::ProjectVerifies CodeBuild artifact encryption
backup-recovery-point-encryptedAWS::Backup::RecoveryPointVerifies backup encryption
sagemaker-endpoint-configuration-kms-key-configuredSageMakerVerifies KMS key on endpoints
sagemaker-notebook-instance-kms-key-configuredSageMakerVerifies KMS key on notebooks
cloudwatch-log-group-encryptedCloudWatchVerifies log group encryption

Source: ndx-try-aws-lza/security-config.yaml lines 127-267


7. Encryption Boundary Summary

Encryption at Rest

ServiceData TypeMethodKey TypeRotation
DynamoDBAll 3 tables + GSIs + backupsSSE (CUSTOMER_MANAGED)Customer-managed KMSAnnual (auto)
S3 (Frontend)Static UI assetsSSE-KMSCustomer-managed KMSAnnual (auto)
S3 (Logs)CloudFront access logsSSE-KMSCustomer-managed KMSAnnual (auto)
Secrets ManagerJWT secret, IdP certSSECustomer-managed KMSAnnual (key) / 30 days (JWT value)
EBS VolumesAll volumes org-wideDefault encryptionAWS-managed or account defaultN/A
CloudWatch LogsApplication logsAES-256 or KMSAWS-managed by defaultN/A

Encryption in Transit

ConnectionProtocolTLS VersionCertificate
User to CloudFrontHTTPSTLS 1.2+ACM or CloudFront default
CloudFront to S3HTTPS (OAC with SigV4)TLS 1.2+AWS internal
CloudFront to API GatewayHTTPSTLS 1.2+AWS internal
API Gateway to LambdaAWS internalN/AN/A
Lambda to DynamoDBHTTPSTLS 1.2+AWS SDK
Lambda to Secrets ManagerHTTPSTLS 1.2+AWS SDK
Lambda to SSMHTTPSTLS 1.2+AWS SDK
GitHub Actions to AWSHTTPS (OIDC/STS)TLS 1.2+Public CA


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