Skip to content

TOML Alternative #2379

@mousedownmike

Description

@mousedownmike

I was initially going to place this as a comment on #2253 but I fear it might sidetrack efforts there so I'm opening a separate ticket.

The issue in #2253 highlights a point of friction I found while trying to learn SAM. The use of TOML for the samconfig file seems unique and arbitrary in the scope of AWS utilities that I've worked with. With the exception of credential files which seem to be TOML-like, I'm not familiar with any other AWS tools that use TOML to the extent that SAM does. In an environment where JSON and YAML are abundant, is it necessary to introduce an additional (and somewhat incompatible) file format? As someone new to SAM, here are my initial observations:

  • The required conversion of hyphens to underscores seems onerous, under-documented and unnecessary.
  • Having configuration data on the CLI, in JSON, YAML and TOML that are all VERY similar looking (parameter_-overrides being a prime example) yet incompatible among formats (i.e. I can't copy and paste) introduces error-prone and time-consuming processes depending on the tasks being worked on.
  • Simple things like maps and lists are made complex and difficult to read in TOML.
  • To the extent TOML is being used in SAM, it isn't clear what benefits it offers over normal JSON and YAML syntax.

Is this a technical decision that is open to review in future CLI revisions? Is it possible to support JSON syntax as an alternative?

I'm enjoying the benefits that I'm getting from adopting SAM in my project but I'm concerned that the developer friction will slow/stall adoption. The YAML heavy format of CloudFormation is already a high hurdle, adding TOML to that seems to introduce more difficulties than it solves.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions