Skip to content

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.

PresetLambda MemoryTimeoutAPI Rate LimitAPI BurstVPCEstimated Cost
nano128 MB10s10/s20No~$5–15/mo
micro256 MB10s50/s100Yes~$30–80/mo
medium512 MB15s100/s200Yes~$100–300/mo
large1024 MB30s500/s1000Yes~$500+/mo

Specify a preset in your environment config:

import type { EnvConfigInput } from '@venturekit/core';
export const dev: EnvConfigInput = {
preset: 'nano',
dataSafety: 'relaxed',
};

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.

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,
},
};
EnvironmentPresetData Safety
devnanorelaxed
stagemicrostandard
prodmedium or largestrict
import { getPreset, PRESET_NANO, PRESET_MICRO } from '@venturekit/core';
const nano = getPreset('nano');
// Returns the full PresetConfig object with all default values