Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E1031 Fn::ToJsonString is not supported without 'AWS::LanguageExtensions' transform #3415

Closed
Zippy1999 opened this issue Jun 26, 2024 · 2 comments · Fixed by #3417
Closed

Comments

@Zippy1999
Copy link

CloudFormation Lint Version

1.3.6

What operating system are you using?

Mac

Describe the bug

Since upgrading to 1> I am getting the following error:

E1031 Fn::ToJsonString is not supported without 'AWS::LanguageExtensions' transform

At the top of cloud-formation.yaml we have the transform defined

AWSTemplateFormatVersion: 2010-09-09
Transform: 
  - AWS::Serverless-2016-10-31
  - AWS::LanguageExtensions

This was working fine in versions prior to 1.. (works with 0.87.7)

Expected behavior

Linting should pass

Reproduction template

 EventBusSchedule:
   Type: AWS::Scheduler::Schedule
   .......
   Properties:
     ......
     Target:
       Arn: !GetAtt Queue.Arn
       RoleArn: !GetAtt SomeRole.Arn
       Input:
         Fn::ToJsonString:
           somId: mysecret/idnfo
           eventType: success
          ```
@kddejong
Copy link
Contributor

SAM is removing all the transforms from the template so this will work. Thinking about how to resolve this correctly.

Transform: 
  - AWS::LanguageExtensions

Also according to the docs you should flip your transform order.

@Zippy1999
Copy link
Author

Great work @kddejong - confirmed all OK now in 1.3.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants