Skip to main content

AWS CloudFormation

AWS CloudFormation is Amazon Web Services' infrastructure as code (IaC) service that enables users to model, provision, and manage AWS infrastructure and resources using declarative templates written in JSON or YAML format. CloudFormation allows organizations to define their entire cloud infrastructure stack programmatically, treating infrastructure as version-controlled code that can be deployed, updated, and replicated consistently across multiple environments, regions, and AWS accounts.

CategoryInfrastructure as code
DirectionQuery source
Sign-inNo Authentication
Query languagesSQLite
Tables4
Query templates13
Websitehttp://aws.com

Before you start​

AWS CloudFormation needs no credentials — Huntbase queries it without signing in.

Watch out for
  • Put a template extension on each wildcard, such as *.template, *.yaml or *.json. A bare * also matches files that aren't templates, which can cause errors.
  • Use // to separate a repository or bucket from the subdirectory you want to read.
  • Private S3 buckets need AWS credentials that have s3:ListBucket, s3:GetObject and s3:GetObjectVersion. You can read public buckets without credentials.

Connect AWS CloudFormation​

  1. Go to Connections and click New connection, or click New connection on the AWS CloudFormation product page.
  2. On Product, pick AWS CloudFormation and choose the Owner.
  3. On Details, give the connection a Name and, optionally, a Description.
  4. On Connect, fill in the settings and credentials described below.
  5. On Verify, review the summary and click Create & check.

For everything else on the setup page — saving a draft, I'll do this later, and what each check result means — see Connections.

Settings​

Where your AWS CloudFormation lives:

FieldRequiredNotes
PathsNoA list of template locations. Each entry can be a Git repository URL such as github.com/awslabs/aws-cloudformation-templates//**/*.yaml or an S3 URL such as s3::https://<bucket>.s3.<region>.amazonaws.com/<folder>//*.yaml. Wildcards and ** for recursive matches are supported.

Credentials​

The only Method is No Authentication. Enter a Credential label (for example Production), then fill in:

No fields — choose this method to connect without credentials.

Query it​

Once connected, AWS CloudFormation can serve these languages in a query tab, and Scout can use it when you ask in Auto:

LanguageUse it for
SQLiteSQL over the 4 tables listed below, alongside every other connected source.

Example: SQLite​

CloudFormation Stack Output Basic Info — Explore the key details of AWS CloudFormation stack outputs, including output values, descriptions, and paths.

select
name,
description,
value,
path
from
awscfn_output;

AWS CloudFormation ships with 13 query templates. Find them in Library › Queries — see Query templates.

Tables​

AWS CloudFormation adds 4 tables. Browse their columns from Schema in the query bar's ⋯ menu.

All 4 tables
TableContains
awscfn_mappingCloudFormation mapping information.
awscfn_outputCloudFormation resource information
awscfn_parameterCloudFormation parameter information
awscfn_resourceCloudFormation resource information.

Next steps​