CDK Constructs
CDK Constructs encapsulate Arda’s engineering best practices for individual AWS resource groups. They are high-level (L2/L3) constructs that compose L1 and L2 AWS resources with pre-configured defaults, naming conventions, and security settings. Defined in src/cdk/constructs/.
Standard Construct Pattern
Section titled “Standard Construct Pattern”Each construct module defines:
| Type | Description |
|---|---|
Configuration | True configuration parameters affecting resource behavior |
Props extends Configuration | Adds CDK binding types (e.g., ec2.IVpc) for context dependencies. All members readonly |
Built | Resources and values produced by the construct. All members readonly |
Constructor signature:
constructor(scope: cdk.Construct, id: string, props: Props)Public member: readonly build: Built
Best practice: include static validateProps(id: string, props: Props): boolean to throw before super() if inputs are invalid.
Construct Template
Section titled “Construct Template”import * as cdk from 'aws-cdk-lib';import { Construct } from 'constructs';
export interface Configuration { /* behavioral params */ }export interface Props extends Configuration { /* CDK binding types */ }export interface Built { /* produced resources */ }
export class MyConstruct extends Construct { public readonly build: Built;
static validateProps(id: string, props: Props): boolean { /* validate */ return true; }
constructor(scope: cdk.Construct, id: string, props: Props) { validateProps(id, props); super(scope, id); // define resources... this.build = { /* results */ }; }}Organization by Category
Section titled “Organization by Category”| Category | Contents |
|---|---|
compute | Lambda functions, EKS clusters |
networking | VPCs, Load Balancers |
storage | S3 buckets, EFS, DynamoDB, RDS |
xgress | API Gateway, VPC Links, DNS entries |
oam | CloudWatch, X-Ray, monitoring dashboards |
platform | Global Arda Platform configuration constructs |
An inline-lambdas/ subdirectory holds Lambda function source code that is read as text by CDK constructs (enabling full IDE support — type checking, linting — for Lambda code that would otherwise be embedded as strings).
Reuse Across Repositories
Section titled “Reuse Across Repositories”Constructs are currently hosted in the infrastructure repository. The long-term plan is to publish them as npm packages so component repositories can consume them directly without duplication. Until then, some component repositories may temporarily copy reusable construct code.
Copyright: © Arda Systems 2025-2026, All rights reserved