Lambda AZ Metadata with TypeScript Powertools — Same-AZ Routing in 3 Lines
Implement same-AZ routing using Powertools getMetadata() in TypeScript. Verified caching behavior and clearMetadataCache() with real measurement data.
Content tagged with "typescript"
Implement same-AZ routing using Powertools getMetadata() in TypeScript. Verified caching behavior and clearMetadataCache() with real measurement data.
How I added a lightweight TIL (Today I Learned) content type by defining a new Velite collection, reusing existing components with minimal adaptation, and integrating into search — all without a single new dependency.
Three patterns worth reusing: Velite's default(false) for safe schema evolution, a MAX_TAGS overflow indicator, and conditionally rendering sections that hide themselves when empty.
Refactored src/lib/i18n.ts into src/lib/i18n/index.ts without changing any of the 50+ import statements using @/lib/i18n. Node.js module resolution falls back to index.ts automatically.
import { DurableContext } from '@aws/durable-execution-sdk-js' throws SyntaxError at runtime. Only import withDurableExecution for .mjs deployments.