λ# — v0.5.0.3 Release Notes

λ# is a CloudFormation compiler for accelerating serverless .NET application development on AWS. λ# is an open-source project hosted on GitHub.

This release focuses on improving the λ# CLI deploy command.

New: Support for ANSI terminal formatting

This release finally adds a feature I had been looking forward for a long time: ANSI terminal support!

Not only is the output now color-coded for easy reading, but updates to CloudFormation stacks are now shown in place. This means it becomes much easier to see what is going on.

For CI/CD scenarios — or when there is no ANSI support — the deploy command has an --no-ansi option to disable the ANSI colored output.

And big thanks to Li Haoyi for authoring the best tutorial on ANSI terminal codes!

New: Deployment Parameter Functions

The λ# CLI already did some processing of parameter files used to deploy modules, such as converting KMS key aliases to ARNs. This release pushes things even further, by allowing parameter files to reference outside values.

This means, it is now possible to create parameter files that are based on values from other locations, such as a global JSON configuration file, a system environment variable, or the parameter store.

Let’s consider the following params.yml file:

ApiKey: AQICAHh7n6rans2ZnBXULLCW2KSdU...+xo1y2qIGqw==
ReplyEmail: bob@example.org
Language: en_US.UTF-8

Rather than hard-coding these values, they can now be gathered by the CLI during the deploy step.

ApiKey: !GetConfig [ '../global.json', Services.SomeApi.ApiKey ]
ReplyEmail: !GetParam /Company/EmailAddress
Language: !GetEnv LANG

The !GetConfig function takes two arguments: the location of a JSON file and a JSON-path expression. The CLI loads the file and finds value at the JSON-path expression. This function is recommended when there is a central configuration file that is used for deploying multiple modules.

The !GetParam function reads a value from the AWS Parameter Store. If the value is stored as a SecureString, it is automatically decrypted when retrieved and re-encrypted with the DefaultSecretsKey for the deployment tier.

The !GetEnv function is similar, but reads a value from the system environment variables instead.

With these new functions, it is now much simpler to share deployment parameters across modules in a safe and repeatable manner. I think this will be a very welcome improvement!

Fixes

In addition, we included a few fixes in this release.

Please reach out to us with feedback on Twitter @lambdasharp or file any issues on GitHub.

Happy Hacking!