Serverless CloudFormation Sub Variables Plugin
JSON →This plugin for the Serverless Framework enhances `serverless.yml` files by automatically converting a custom `#{Variable}` syntax into AWS CloudFormation `Fn::Sub` functions. It supports a wide range of CloudFormation variables, including template parameters, resource logical IDs, resource attributes, pseudo parameters (e.g., `AWS::Region`), literal variables, and key-value map `Fn::Sub` functions. The plugin operates during the `package` command, executing its transformations after Serverless variables (`${self:variable}`) are resolved but before the CloudFormation template is packaged for deployment. A key feature is its ability to automatically wrap strings with `Fn::Sub` unless `Fn::Sub` is already explicitly defined in the parent YAML node, providing flexibility for complex scenarios. The current stable version is 0.2.1, released in late 2023, reflecting a deliberate, slower release cadence focused on stability and specific bug fixes. Its primary differentiator is the transparent and generic conversion of `#{...}` syntax across the entire CloudFormation template portion of `serverless.yml`, simplifying complex CloudFormation variable usage without extensive manual `Fn::Sub` declarations.
Traffic · last 30 days ↑0% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇮🇳 India · IQ · 🇳🇴 Norway