Functions

Some of the Intrinsic functions in CloudFormation

  • Fn::GetAtt
    • Get attribute of any resources.
      • AvailabilityZone,
      • DNSName
    • More in the documentation
    • For example: !GetAtt EC2Instance.AvailabilityZone
  • Fn::FindInMap
    • Find value of mappings
    • !FindInMap[mapName, TopLevelKey, SecondLevelKey]
  • Fn::ImportValue
    • Import values that are exported in other templates
    • !ImportValue SSHSecurityGroup
  • Fn::Join
    • Join values with parameters
    • !Join[":", [a,b,c] = "a:b:c"
  • Fn::Sub
    • Substitue value within a string
    • String must contain ${VariableName}
  • Conditions
    • Fn::And
    • Fn::Equals
    • Fn::If
    • Fn::Not
    • Fn::Or