YAML Cheat Sheet

YAML File Logo

YAML, Yet Another Markup Language

External Resources

YAML Arrays

Dash List

YAML can use a dash (- or hyphen) list to represent arrays. A hyphen (-) followed by white space ( ) represents an element of an array. When you enter the dashes, you need to ensure that all items are at the same indentation level.

fruits: first
    - apple
    - pear
    - bannana
    - orange

Bracket Notation

YAML can also use brackets and commas to represent arrays.

fruits: [apple, pear, bannana, orange]

Comments within YAML

To comment, use #. For example, to disable a command entry.

version: 0.2

phases:
  post_build:
    commands:
      # - aws s3 rm s3://pennockprojects.com --recursive