Enter your search

AWS CloudFormation Cheat Sheet

By
A quick reference of common CloudFormation elements

Tired of trawling through the full CloudFormation docs? Here’s a quick reference for commonly used things.

Intrinsic functions

!Ref ResourceName
{ "Fn::Ref": "ResourceName" }

!GetAtt ResourceName.AttributeName
{ "Fn::GetAtt": [ "ResourceName", "AttributeName" ] }

!Sub "something:with:${Variable}"
{ "Fn:Sub": "something:with:${Variable}" }

!Sub
  - something:with:${Variable}
  - { Variable: "foo" }
{ "Fn:Sub": [ "something:with:${Variable}", { "Variable": "foo" } ] }

Syntax

Yaml form Yaml Shorthand Original JSON
Fn::Ref arg !Ref arg { "Fn::Ref": arg }

Intrinsic functions can be nested, but take care with the shorthand yaml form as that cannot be nested consecutively.

Ok: Fn::GetAZs: !Ref 'AWS::Region'
Not Ok: !GetAZs !Ref 'AWS::Region'

Global variables

AWS::Region
AWS::AccountId

You May Also Like

Group 5 Created with Sketch. Group 11 Created with Sketch. CLOSE ICON Created with Sketch. icon-microphone Group 9 Created with Sketch. CLOSE ICON Created with Sketch. SEARCH ICON Created with Sketch. Group 4 Created with Sketch. Path Created with Sketch. Group 5 Created with Sketch.

undefined

Chat with GoSquared

undefined

Chat with GoSquared
Need help? Want to know how you can make the most of GoSquared? Let's chat!

undefined

Drop files here to upload