Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>YAML Clouformation highlighterNew to Visual Studio Code? Get it now.
YAML Clouformation highlighter

YAML Clouformation highlighter

paql4711

|
2,195 installs
| (2) | Free
This extension will enhance the existing YAML markdown by special commands and variables used within Cloudformation.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

VSCode YAML Grammar Injection for AWS Cloudformation support

Version Version

AWS Cloudformation relies on YAML with the addition of several functions, inline codes and variables. These are only partially highlighted within the default YAML markup, so the extension will support highlighting relevant parts of the code.

Examples

YAML Cloudformation Highlighting:

features

Using Inline Code:

features

Usage

The extension is ready to use after the installation for Syntax highlighting.

To enable inline code formatting the start and end Tag needs to be set as comment since Cloudformation has no pattern to identify start / end of certain langugaes.

The formatting will only work behind | with exactly the defined Syntax.

E.g.:
Code: !Sub | #.ps1 (Change .ps1 by Codelanguage fileextension)
      <Some Powershell Code>
      <Some Powershell Code>
      <Some Powershell Code>

Supported Variables

Following variables are currently included in the auto-highlighting

  • Functions starting with ! or Fn:: (Fn:: is not fully supported yet!)
    • e.g. !Ref, !Sub
  • Variables within Sub Strings
    • e.g. !Sub "Hello from ${region}"
  • Static variables for AWS:: Values
    • e.g. AWS::AccountId
  • Resource Type will be highlighted as Class

Supported Inline Codes

Following file extensions / codes are supported in the current version:

  • PowerShell (.ps1)
  • Python (.py)
  • JSON (.json)
  • TypeScript (.ts)
  • Shellscript (.sh)
  • JavaScript (.js)
  • Java (.java)
  • SQL (.sql)
  • XML (.xml)
  • HTML (.html)
  • CSS (.css)

Contribution

The entire project is open source and can be found on:

  • https://github.com/paql4711/vscode-yaml-cfn-markdown

In case you experience any issues please raise them directly within GitHub, for contributing please feel free to raise a pull request.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft