AWS CloudFormation
User Guide (API Version 2010-05-15)
Did this page help you?  Yes | No |  Tell us about it...
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.


The intrinsic function Fn::Base64 returns the Base64 representation of the input string. This function is typically used to pass encoded data to Amazon EC2 instances by way of the UserData property.


{ "Fn::Base64" : valueToEncode }



The string value you want to convert to Base64.

Return Value:

The original string, in Base64 representation.


         { "Fn::Base64" : "AWS CloudFormation" }

Supported Functions

You can use the Fn::If function in the Fn::Base64 function.