Skip to content
Chuck Meyer
Latest commit 57f0061 Jan 21, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information. Corrected text in `Basic Usage` to match example. Jan 22, 2019
string.yaml fix macro typos Oct 16, 2018
string_example.yaml Use correct folder name for MacrosExamples Sep 6, 2018

String functions

Provides string transformation utility functions.

Basic Usage

Place the transform where you would like the output to be placed and provide the input string as the value for the InputString Parameter. The example below shows converting an input parameter to upper case and setting it as the value for a tag on an s3 bucket.

    Default: "This is a test input string"
    Type: String
    Type: "AWS::S3::Bucket"
        - Key: Upper
             - Name: 'String'
                 InputString: !Ref InputString
                 Operation: Upper

Available Operations


Return a copy of the string with all the cased characters converted to uppercase.


Return a copy of the string with all the cased characters [4] converted to lowercase.


Return a copy of the string with its first character capitalized and the rest lowercased.


Return a titlecased version of the string where words start with an uppercase character and the remaining characters are lowercase.


Return a copy of the string with uppercase characters converted to lowercase and vice versa.


Return a copy of the string with the leading and trailing characters removed. The Chars parameter is a string specifying the set of characters to be removed. If omitted default is to remove whitespace. The Chars argument is not a prefix or suffix; rather, all combinations of its values are stripped.

Additional Parameters

Chars: [optional] characters to strip from beginning and end of string


Return a copy of the string with all occurrences of substring Old replaced by New.

Additional Parameters

Old: [required] sub-string to search for

New: [required] string to replace Old with


Return a copy of the string with a maximum length as specified by the Length parameter. Default is to strip characters from the end of the string.

Additional Parameters

Length: [required] maximum length of string

StripFrom: [optional] specifying Left will strip characters from the beginning of the string, Right from the end (default)


Jay McConnell
Partner Solutions Architect
Amazon Web Services

You can’t perform that action at this time.