Loading...
Loading...
How services consume runtime configuration from SSM Parameter Store. Apply when a Lambda or service needs to read configuration values at runtime.
npx skill4agent add loxosceles/ai-dev ssm-runtime-configurationInfrastructure Deployment → Creates/Updates SSM Parameters
↓
SSM Parameter Store
(Single Source of Truth)
↓
┌─────────────────┴─────────────────┐
↓ ↓
Local Development CI/CD Pipeline
(with .env.local overrides) (SSM values only)/{project-id}/{environment}/{service}/VARIABLE_NAME
Examples:
/my-app/local/frontend/API_ENDPOINT
/my-app/dev/frontend/API_ENDPOINT
/my-app/prod/backend/DATABASE_URL# Minimal config for CDK deployment
CDK_DEFAULT_ACCOUNT=123456789012
CDK_DEFAULT_REGION=eu-central-1# Override SSM values for local development only
API_ENDPOINT=http://localhost:3000// At application startup
import { SSMClient, GetParameterCommand } from '@aws-sdk/client-ssm';
const ssmClient = new SSMClient({ region: process.env.AWS_REGION });
async function getConfig(environment: string, service: string) {
const path = `/${PROJECT_ID}/${environment}/${service}/`;
// Fetch all parameters under path
// Apply .env.local overrides if environment === 'local'
return config;
}infrastructure/.env.env_TEMPLATE.env.local.env.dev.env.prod# .env_TEMPLATE
# Purpose: Document expected variables
# Instructions: Copy to .env.local and customize
# API Endpoint (from SSM by default)
# API_ENDPOINT=http://localhost:3000# Get single parameter
ssm-params get /{project-id}/dev/frontend/API_ENDPOINT
# Export all parameters for service
ssm-params export-service dev frontend
# Output as .env format
ssm-params export-service dev frontend > .env