JSON Schema for AWS CloudFormation templates.
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
With Visual Studio Code
Open 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...
- For Atom - OmniSharp/atom-json-schema
- For Vim - Quramy/vison
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.
- AWS CloudFormation Resource Specification - AWS CloudFormation
- Specification Format - AWS CloudFormation
- AWS Regions and Endpoints - Amazon Web Services
npm run build
npm test