Component 09

SSR Lambda

Run a server-rendered application on Lambda, with its code loaded from S3.

Status

Available component

Deployment scope

Primary + DR ready

Example version constraint

~> 0.2

Review published versions ↗

Usage example

Inputs in, outputs out. Illustrative wiring, not a standalone deployment.

Supply a deployment bucket and key for the function package, and upload a package before the first apply. Decide whether this component creates the execution role or you provide one. Configure provider requirements and credentials in your root module; check the documentation for all required inputs and version changes.

main.tf
module "lambda" {
  source = "pomo-studio/ssr-lambda/aws"
  version = "~> 0.2"

  function_name = "my-app-primary"
  s3_bucket     = module.storage.lambda_deployments_primary_id
  s3_key        = "lambda/function.zip"
  handler       = "index.handler"
  runtime       = "nodejs22.x"
}

Key inputs

  • function_name
  • s3_bucket
  • s3_key
  • handler
  • runtime
  • memory_size
  • timeout

Useful outputs

  • function_arn
  • function_name
  • invoke_arn
  • role_arn

What you get

01

Runs the rendered app

Puts your Nitro or Next handler behind a Lambda function URL.

02

Code from S3

Loads the deployment package from a bucket and key you nominate.

03

Role optional

Create an execution role or supply an existing one to share across functions.

Built with

  • AWS Lambda
  • S3
  • Terraform