postmodern.

Pattern 05

GraphQL API

Opinionated AppSync GraphQL APIs with Cognito auth, DynamoDB/Lambda sources, and X-Ray tracing.

Status

Available module

Deployment scope

Primary + DR ready

Recommended version

~> 1.1

What you get

01

Managed GraphQL

Provision an AppSync API with a clear, extensible baseline.

02

Multiple data sources

Connect DynamoDB for persistence and Lambda for business logic.

03

Observable by default

Trace requests end to end with built-in X-Ray integration.

Start here

Add the module to your configuration and customize only what you need.

main.tf
module "api" {
  source = "pomo-studio/appsync/aws"
  version = "~> 1.1"

  name                  = "my-api"
  schema                = file("${path.module}/schema.graphql")
  cognito_user_pool_arn = module.auth.user_pool_arn
  enable_xray           = true
}

Key inputs

  • name
  • schema
  • cognito_user_pool_arn
  • dynamodb_data_sources
  • enable_dr

Useful outputs

  • api_id
  • api_url
  • realtime_url
  • data_source_names

Built with

  • AWS AppSync
  • GraphQL
  • Cognito
  • DynamoDB
  • Terraform