You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
❯ cfn-lint sam/test-template.yml
E0001 Error transforming template: Structure of the SAM template is invalid. Every UpdateReplacePolicy member must be a string.
sam/test-template.yml:1:1
Edit:
I did try a template with both transforms in the web console and it works as expected.
However, the order of the transforms is important. If AWS::Serverless-2016-10-31 is specified first, the changeset creation fails.
The text was updated successfully, but these errors were encountered:
Good catch. Looking into this. We are able to translate a SAM template into a Cfn template using the aws-sam-translator package. There isn't an equivalent package for the LanguageExtensions.
The expansion of LanguageExtensions to more functions may change some of these answers. For the functions that exist today ideally SAM could just pass forward those values to the resulting resources.
We should probably create a rule (for now) that calls out the ordering.
Current plan is to disable SAM validation checks. Completed with PR #2350
Based on how SAM is handling transforms today we will be creating a rule to have SAM as the last transform
cfn-lint version: 0.63.0
Description of issue.
Please provide as much information as possible:
Used template: https://github.com/aws-cloudformation/cfn-lint/blob/ff506197e7b4693a41aa630f71deab96ead45e72/test/fixtures/templates/good/resources_lang_extensions_updatereplacepolicy.yaml
Update the transform section of the template to
Transform: [AWS::LanguageExtensions, AWS::Serverless-2016-10-31]
Expected result: cfn-lint is successful
Actual result:
Edit:
I did try a template with both transforms in the web console and it works as expected.
However, the order of the transforms is important. If
AWS::Serverless-2016-10-31
is specified first, the changeset creation fails.The text was updated successfully, but these errors were encountered: