WHAT YOU'LL LEARN
  • What cloud resources the API application deploys
  • How different Webiny applications use API infrastructure

Overview
anchor

The API application is your project’s GraphQL API, used by the Admin application. It consists of multiple AWS Lambda functions handling GraphQL requests, file operations, background tasks, and more.

Diagram
anchor

For brevity, the diagram doesn’t include network-level resources like VPC and availability zones. See Deployment Modes for those details.

Stateful resources like S3, Cognito, DynamoDB, and OpenSearch are shown for clarity but are deployed as part of Core Infrastructure.

Webiny Cloud Infrastructure - APIWebiny Cloud Infrastructure - API
(click to enlarge)

API Resources
anchor

Amazon API Gateway

HTTP API that routes requests to Lambda functions. Handles GraphQL operations, file uploads/downloads, and other API endpoints.

AWS Lambda Functions

  • GraphQL Handler - Processes GraphQL queries and mutations
  • File Upload/Download - Handles file operations and image optimization
  • Background Tasks - Executes long-running jobs
  • Import/Export - Manages bulk data operations

AWS Step Functions

Orchestrates background task execution. Step Functions coordinate multi-step workflows and long-running processes.

How Applications Use API Infrastructure
anchor

Security
anchor

Integrates with Amazon Cognito for authentication. Extends the GraphQL schema with user management, roles, and permissions. Stores data in DynamoDB.

Headless CMS
anchor

Extends GraphQL schema with content models. Stores content in DynamoDB and uses OpenSearch for advanced search and filtering.

File Manager
anchor

Adds dedicated Lambda functions for file upload, download, and image optimization. Stores files in S3 and metadata in DynamoDB.

Background Tasks
anchor

Uses Step Functions and Lambda to execute long-running jobs. Triggered via EventBridge events. Perfect for data imports, exports, and batch operations. See the Background Tasks section for details.

FAQ
anchor

Why Lambda Instead of AWS AppSync?
anchor

Using Lambda for the GraphQL handler provides:

  • Customization - Full control over request/response handling
  • Testing - Easy unit testing with standard JavaScript tools
  • Flexibility - Applications can modify schema based on context (locale, tenant, etc.)
  • Portability - Easier to support multiple cloud providers in the future

Which GraphQL Implementation?
anchor

Webiny uses GraphQL Toolsexternal link for its lightweight approach and ease of implementation.

Which API Gateway Type?
anchor

By default, Webiny deploys HTTP APIsexternal link for better performance and lower cost.