Presets
Presets are predefined environment configurations that give you sensible defaults for Lambda memory, timeouts, API throttling, VPC, and more. Use a preset as your starting point, then override specific fields as needed.
Available Presets
Section titled “Available Presets”| Preset | Lambda Memory | Timeout | API Rate Limit | API Burst | VPC | Estimated Cost |
|---|---|---|---|---|---|---|
nano | 128 MB | 10s | 10/s | 20 | No | ~$5–15/mo |
micro | 256 MB | 10s | 50/s | 100 | Yes | ~$30–80/mo |
medium | 512 MB | 15s | 100/s | 200 | Yes | ~$100–300/mo |
large | 1024 MB | 30s | 500/s | 1000 | Yes | ~$500+/mo |
Specify a preset in your environment config:
import type { EnvConfigInput } from '@venturekit/core';
export const dev: EnvConfigInput = { preset: 'nano', dataSafety: 'relaxed',};Overriding Preset Values
Section titled “Overriding Preset Values”Presets are starting points. Override any field:
export const prod: EnvConfigInput = { preset: 'medium', // Start with medium defaults dataSafety: 'strict', lambda: { memoryMb: 768, // Override Lambda memory timeoutSec: 20, // Override timeout tracingEnabled: true, // Add X-Ray tracing }, api: { throttleRateLimit: 200, // Override rate limit },};The override merges with the preset — you only need to specify the fields you want to change.
Going Fully Explicit
Section titled “Going Fully Explicit”You can skip presets entirely and specify everything yourself:
export const custom: EnvConfigInput = { // No preset — all values explicit dataSafety: 'strict', lambda: { memoryMb: 1024, timeoutSec: 30, vpcEnabled: true, logRetentionDays: 90, tracingEnabled: true, architecture: 'arm64', }, api: { throttleRateLimit: 500, throttleBurstLimit: 1000, cors: { allowOrigins: ['https://app.example.com'], allowCredentials: true, }, }, vpc: { maxAzs: 2, natGateways: 1, }, observability: { alarmsEnabled: true, tracingEnabled: true, detailedMetricsEnabled: true, },};Recommended Preset per Environment
Section titled “Recommended Preset per Environment”| Environment | Preset | Data Safety |
|---|---|---|
dev | nano | relaxed |
stage | micro | standard |
prod | medium or large | strict |
Accessing Presets Programmatically
Section titled “Accessing Presets Programmatically”import { getPreset, PRESET_NANO, PRESET_MICRO } from '@venturekit/core';
const nano = getPreset('nano');// Returns the full PresetConfig object with all default values