Mapping

The mapping method maps to the CloudFormation Template Anatomy Mappings section.

Example Snippets

There are 2 forms for mapping. Here are example snippets:

# medium form
mapping("AmiMap",
  "ap-northeast-1": {Ami: "ami-084cb340923dc7101"},
  "ap-south-1":     {Ami: "ami-0d7805fed18723d71"},
)

# long form
mapping("ImageMap" => {
  "ap-northeast-1": {Ami: "ami-084cb340923dc7101"},
  "ap-south-1":     {Ami: "ami-0d7805fed18723d71"},
})

Example Outputs

Mappings:
  AmiMap:
    ap-northeast-1:
      Ami: ami-084cb340923dc7101
    ap-south-1:
      Ami: ami-0d7805fed18723d71
  ImageMap:
    ap-northeast-1:
      Ami: ami-084cb340923dc7101
    ap-south-1:
      Ami: ami-0d7805fed18723d71

find_in_map method

The mapping method is used in conjuction with the find_in_map method.

Back to DSL List Docs.

Pro tip: Use the <- and -> arrow keys to move back and forward.

Edit this page

See a typo or an error? You can improve this page. This website is available on GitHub and contributions are encouraged and welcomed. We love pull requests from you!