cfn-schema
JSON Schema for AWS CloudFormation templates.
Schema URL
https://cfn-schema.y13i.com/schema
You can add query parameters to explicitly specify region and resource spec version.
Query Parameter Name | Default Value |
---|---|
region | us-east-1 |
version | latest |
For example...
https://cfn-schema.y13i.com/schema?region=eu-west-1&version=20.0.0
Usage
Visual Studio Code
WithOpen Workspace Settings by pressing Ctrl + , or ⌘ + , and add JSON Schema setting like this.
{
"json.schemas": [
{
"fileMatch": ["*.cfn.json"],
"url": "https://cfn-schema.y13i.com/schema"
}
]
}
Save your template file with the extension .cfn.json
. That's it.
If you prefer YAML, use YAML Support by Red Hat extension and set like this.
{
"yaml.schemas": {
"https://cfn-schema.y13i.com/schema": "*.cfn.yaml"
}
}
See also...
With other editors
- For Atom - OmniSharp/atom-json-schema
- For Vim - Quramy/vison
Development
From Nov 2020, cfn-schema uses API Gateway and Lambda (deployed by AWS SAM) to convert resource spec to JSON Schema.
See base.json for the base schema. See build.js for building logic which merges AWS-providing Resource Specification to the base schema.
Related Documents
- AWS CloudFormation Resource Specification - AWS CloudFormation
- Specification Format - AWS CloudFormation
- AWS Regions and Endpoints - Amazon Web Services
Build
npm run build
Test
npm test