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.
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.