Readable Nesting

Nesting Intrinsic Functions Without Losing Readability

Functions nest, and the engine evaluates them from the inside out. Both values below build the same URL for an SSM parameter from a website bucket's WebsiteURL minus its http://; deployed on LocalStack 63,725 , both returned https://<bucket>.s3-website.localhost.localstack.cloud:4566/dev/books (with the container's port 4566, not the host port 31566):

The same value, nested with Join and flattened with SubYAML
      # Nested
      Value: !Join
        - ""
        - - "https://"
          - !Select [1, !Split ["//", !GetAtt FrontEndBucket.WebsiteURL]]
          - !Sub "/${Stage}/books"
      # Flattened
      Value: !Sub
        - https://${Host}/${Stage}/books
        - Host: !Select [1, !Split ["//", !GetAtt FrontEndBucket.WebsiteURL]]
How the engine evaluates the Sub version, innermost function first
How the engine evaluates the Sub version, innermost function first