Skip to content

Remote TemplateBody is parsed without the CloudFormation schema #443

Description

@GrahamCampbell

ensure-valid-bucket-exists falls back to a schema-less jsyaml.load when the template body fetched via GetTemplate is YAML rather than JSON (lib/plugins/aws/deploy/lib/ensure-valid-bucket-exists.js, line 119 on 4.x and line 85 on 3.x). Because that load does not use the shared CloudFormation schema, a stack originally created outside osls can have date-shaped scalars rewritten to ISO 8601 strings when osls re-submits the merged template, and a template using shorthand intrinsics like !Ref fails outright with CLOUDFORMATION_TEMPLATE_PARSE_FAILED. Passing the shared schema from lib/utils/serverless-utils/cloudformation-schema.js at this call site would fix both, on both branches; see #438 and #441 for the equivalent change on the configuration parse paths.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions