question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

E3012 Property should be of type Json - incorrectly flagging official examples

See original GitHub issue

cfn-lint version: 0.51.0 Description of issue. After upgrading to 0.51.0 today, we are now seeing new lint issues. Specifically E3012 Property should be of type Json on the parameters section of AWS::SSM::Association

Even the example from the official docs is flagged by cfn-lint now. e.g.

Resources:
  SpecificInstanceIdAssociation:
    Type: AWS::SSM::Association
    Properties:
      Name: AWS-RunShellScript
      Targets:
      - Key: InstanceIds
        Values:
        - i-1234567890abcdef0
      Parameters:
        commands:
        - ls
        workingDirectory:
        - "/"
      WaitForSuccessTimeoutSeconds: 300

E3012 Property should be of type Json at Resources/SpecificInstanceIdAssociation/Properties/Parameters/commands test.yaml:11:9 E3012 Property should be of type Json at Resources/SpecificInstanceIdAssociation/Properties/Parameters/workingDirectory test.yaml:13:9

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kddejongcommented, Apr 19, 2022

@evilensky that can be the same template? Maybe a spacing issue. That template gives me

E3001 Type not defined for resource ResourceName
local/issue/2063-1.yaml:2:3

I’m guessing you meant

Resources:
  ResourceName:
    Type: AWS::SSM::Parameter
    Properties:
      Description: Human Readable Description
      Name: /path/of/param
      Tags:
      - {Key: ENVIRONMENT, Value: test}
      - {Key: RESOURCE_NAME, Value: broker_dns_addresses}
      - {Key: STACK_NAME, Value: example-service}
      Type: StringList
      Value: ValueOfParam

Putting in another fix for that

1reaction
kddejongcommented, Jun 28, 2021

Not sure what started the issue as that rule didn’t change but a list is still valid json and we should consider it so. Fixing the issue inside E3012

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resolve template validation or template format errors in ... - AWS
Validate your JSON or YAML templates with the AWS CloudFormation linter ... Resources: EC2Instance01: Type: AWS::EC2::Instance Properties: ...
Read more >
Amazon : Automation Approval for CloudFormation templates
It validates the CFT json/yaml templates against the cloudformation specs which includes checking valid values for resource properties and best ...
Read more >
CFN Lint: AWS CloudFormation Linter - Morioh
This is an attempt to provide validation for AWS CloudFormation templates properties and their values. For values things can get pretty complicated (mappings, ......
Read more >
Changelog — troposphere 4.0.1 documentation - Read the Docs
The json template indent was reduced from 4 to 1 for space savings. Old spacing can be restored ... Remove unneeded properties that...
Read more >
cfn-lint - npm
A more friendly CloudFormation JSON and YAML Validator. ... from Command Line (see above examples); Detecting invalid property types ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found