You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
CloudFormation intrinsic functions let you add logic and dynamic behaviour to your templates. Instead of hard-coding values, you can reference other resources, perform string manipulation, look up values from mappings, and conditionally include or exclude resources. Mastering intrinsic functions is what takes you from writing basic templates to writing production-grade infrastructure definitions.
Intrinsic functions are built-in functions that CloudFormation evaluates at deploy time. They are used inside the Properties section of resources, in Outputs, and in Conditions. You cannot use them in the Parameters or Mappings sections (with one exception: Fn::Ref can be used indirectly in Mappings via the !FindInMap function).
In YAML templates, intrinsic functions use the short form with an exclamation mark prefix:
| Full Form | Short Form |
|---|---|
Fn::Ref | !Ref |
Fn::Sub | !Sub |
Fn::GetAtt | !GetAtt |
Fn::Join | !Join |
Fn::Select | !Select |
Fn::Split | !Split |
Fn::FindInMap | !FindInMap |
Fn::GetAZs | !GetAZs |
Fn::ImportValue | !ImportValue |
Fn::If | !If |
Fn::Base64 | !Base64 |
Fn::Cidr | !Cidr |
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.