This template creates an AWS AppSync GraphQL API with API key authentication and configures a large cache with full request caching behavior.

Terraform Template

resource "aws_appsync_api_cache" "example" {
  api_caching_behavior = "FULL_REQUEST_CACHING"
  api_id = aws_appsync_graphql_api.example.id
  ttl = 900
  type = "LARGE"
}

resource "aws_appsync_graphql_api" "example" {
  authentication_type = "API_KEY"
  name = "example"
}