• Pricing
© 2025 Serverless, Inc. All rights reserved.
Terms of ServicePrivacy Policy
Miguel Frazao

AWS Apollo Lambda (NodeJS & Typescript)

by

This example provides a setup for a Lambda Graphql API with apollo

  1. AWS Apollo Lambda (NodeJS & Typescript)

Apollo Lambda GraphQL API Example

This example demonstrates how to setup a lambda graphql API with apollo

  • I used apiKeys to secure the endpoints but you can add custom authorizers

Use Cases

  • Small graphql API
  • Creating a temporary lambda API that can easily be converted to standard GraphQL API

Setup

  • Setup your env file for AWS deployment with:

      • APOLLO_LAMBDA_KEY
      • NODE_ENV
  • sls deploy

Usage

  • To test it locally with serverless-offline by running: npm run dev
  • set x-api-key header with key your-api-key-that-is-at-least-characters-long

Future

  • Add support for subscription with Redis

Contents

  • Apollo Lambda GraphQL API Example
  • Use Cases
  • Setup
  • Usage
  • Future

Related

GuidesPluginsExamplesSlack CommunitySupport