Standalone Installation Guide

March 25, 2026 ยท View on GitHub

This guide covers installing and configuring the CloudFormation Language Server for standalone editors.

For JetBrains and Visual Studio Code, the language server is bundled with the AWS Toolkit extension.

Prerequisites

  1. Node.js

Download

Download the latest release for your platform from GitHub Releases.

Available Builds

PlatformArchitectureNode VersionAsset
macOSARM64 (Apple Silicon)22cloudformation-languageserver-*-darwin-arm64-node22.zip
macOSx64 (Intel)22cloudformation-languageserver-*-darwin-x64-node22.zip
LinuxARM6422cloudformation-languageserver-*-linux-arm64-node22.zip
Linuxx6422cloudformation-languageserver-*-linux-x64-node22.zip
Linux (glibc 2.28)ARM6418cloudformation-languageserver-*-linuxglib2.28-arm64-node18.zip
Linux (glibc 2.28)x6418cloudformation-languageserver-*-linuxglib2.28-x64-node18.zip
WindowsARM6422cloudformation-languageserver-*-win32-arm64-node22.zip
Windowsx6422cloudformation-languageserver-*-win32-x64-node22.zip

Example: macOS ARM64

curl -L -o cfn-lsp.zip \
  https://github.com/aws-cloudformation/cloudformation-languageserver/releases/latest/download/cloudformation-languageserver-darwin-arm64-node22.zip

unzip cfn-lsp.zip -d /path/to/install-location

Server Configuration

Initialization Options

The language server accepts initialization options via the LSP initialize request:

{
  "initializationOptions": {
    "aws": {
      "clientInfo": {
        "extension": {
          "name": "your-editor-name",
          "version": "1.0.0"
        }
      },
      "telemetryEnabled": true,
      "logLevel": "info"
    }
  }
}
OptionTypeDescription
aws.clientInfo.extension.namestringYour editor/client name
aws.clientInfo.extension.versionstringYour editor/client version
aws.clientInfo.clientIdstring (optional)Unique identifier for the client instance
aws.telemetryEnabledbooleanEnable anonymous usage metrics (default: false)
aws.storageDirstring (optional)Custom directory for logs, caches, and databases. Defaults to platform-specific location (see below)
aws.settingsobject (optional)Settings overrides applied before workspace configuration sync. Useful for editors that don't support workspace/configuration reliably. See Settings below.

For the full initialization options schema, see src/server/InitParams.ts.

Settings

The aws.settings object (and the aws.cloudformation workspace configuration) controls server behavior. All fields are optional with sensible defaults. For the complete schema and defaults, see src/settings/Settings.ts.

SettingTypeDefaultDescription
profile.regionstringus-east-1AWS region for resource operations
profile.profilestringdefaultAWS credentials profile name

Example with profile and diagnostics customization:

{
  "aws": {
    "settings": {
      "profile": {
        "region": "eu-west-1",
        "profile": "my-profile"
      },
      "diagnostics": {
        "cfnLint": {
          "ignoreChecks": ["E3012"]
        },
        "cfnGuard": {
          "enabledRulePacks": ["cis-aws-benchmark-level-1", "wa-Reliability-Pillar"]
        }
      }
    }
  }
}

Storage

If aws.storageDir is not specified, the server uses platform-specific defaults:

PlatformDefault Location
macOS~/Library/Application Support/aws-cloudformation-languageserver
Linux$XDG_STATE_HOME/aws-cloudformation-languageserver (or ~/.local/state/...)
Windows%LOCALAPPDATA%\aws-cloudformation-languageserver

You can also set the CFN_LSP_STORAGE_DIR environment variable to override the default location.

See Telemetry for details on collected metrics.

Supported File Types

  • yaml - YAML CloudFormation templates
  • json - JSON CloudFormation templates
  • cfn, template - Custom CloudFormation template extensions

Client Setup

Neovim

local lspconfig = require("lspconfig")
local configs = require("lspconfig.configs")

if not configs.cfn_lsp then
  configs.cfn_lsp = {
    default_config = {
      cmd = { "node", "/path/to/install-location/cfn-lsp-server-standalone.js", "--stdio" },
      filetypes = { "json", "yaml", "yml", "cfn", "template" },
      root_dir = function(fname)
        return lspconfig.util.root_pattern(".git", "package.json")(fname) or vim.fn.getcwd()
      end,
      init_options = {
        aws = {
          clientInfo = {
            extension = { name = "neovim", version = vim.version().major .. "." .. vim.version().minor },
          },
          telemetryEnabled = true,
        },
      },
    },
  }
end

lspconfig.cfn_lsp.setup({})

Verify: Open a YAML/JSON file and run :LspInfo

Kiro CLI

Kiro CLI supports custom language servers via its LSP integration. To configure the CloudFormation Language Server:

  1. Run /code init in your project root (if not already initialized)

  2. Edit the generated lsp.json (located at .kiro/settings/lsp.json) and add the cloudformation entry:

{
  "languages": {
    "cfn-lsp": {
      "name": "cloudformation-languageserver",
      "command": "node",
      "args": ["/path/to/install-location/cfn-lsp-server-standalone.js", "--stdio"],
      "file_extensions": ["json", "yaml", "yml", "cfn", "template"],
      "project_patterns": [],
      "exclude_patterns": [],
      "multi_workspace": false,
      "initialization_options": {
        "aws": {
          "clientInfo": {
            "extension": {
              "name": "kiro-cli", 
              "version": "1.0.0"
            }
          },
          "telemetryEnabled": true,
          "logLevel": "warn"
        }
      },
      "request_timeout_secs": 60
    }
  }
}
  1. Restart Kiro CLI to load the new configuration, or run /code init -f to force re-initialization

Verify: Run /code status to confirm the cfn-lsp server is initialized.

Sublime Text (LSP package)

Add to LSP settings:

{
  "clients": {
    "cfn-lsp": {
      "enabled": true,
      "command": [
        "node",
        "/path/to/install-location/cfn-lsp-server-standalone.js",
        "--stdio"
      ],
      "selector": "source.yaml | source.json",
      "initializationOptions": {
        "aws": {
          "clientInfo": {
            "extension": {
              "name": "sublime",
              "version": "4.0"
            }
          },
          "telemetryEnabled": true
        }
      }
    }
  }
}