Laconia

Laconia

  • Getting Started
  • API
  • Help

›Guides

Introduction

  • Getting Started
  • Motivation
  • Core Concepts
  • Philosophy
  • Examples
  • FAQ
  • Support Me

Laconia vs. Other

  • Claudia
  • Express, Koa, Hapi, etc.
  • Middy
  • Serverless, SAM, Apex, etc.

Guides

  • Injecting Dependencies
  • Unit Testing
  • Adapting Events
  • Creating API Endpoints
  • Retrieving Secrets
  • Retrieving Config
  • Warming Up
  • Invoking Other Lambdas
  • Long Running Tasks
  • Creating Middleware

API Reference

  • API Reference: Intro
  • core
  • event
  • adapter
  • adapter-api
  • invoker
  • config
  • batch
  • middleware-lambda-warmer
  • middleware-serverless-plugin-warmup
Edit

Warming Up

Overview

Sometimes you'll have Lambda that you need to warmup. Laconia itself does not have any built-in ability yet to warmup your Lambdas. At this point of time, Laconia provides middlewares that allow you to integrate with existing libraries or tools to bypass your Lambda execution.

Using the built-in middlewares

Lambda execution can be bypassed in Laconia by wrapping the handler around in a middleware. There is two integration that is supported build-in as of the time of writing:

  • serverless-plugin-warmup
  • lambda-warmer

This example below shows how you can bypass the Lambda execution when it is triggered by the serverless-plugin-warmup:

const warmup = require("@laconia/middleware-serverless-plugin-warmup")();
const laconia = require("@laconia/core");

const app = (event, laconiaContext) => {};
const handler = laconia(app);

exports.handler = warmup(handler);
← Retrieving ConfigInvoking Other Lambdas →
  • Overview
  • Using the built-in middlewares
Laconia
Docs
Getting StartedCore ConceptsAPI Reference
Community
Stack OverflowChat
More
TwitterGitHubStar
Copyright © 2022 Wisen Tanasa
Logo designed by Suzie Nam