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.

Return W3002 instead of E3002 for additional resources supported by package command

See original GitHub issue

cfn-lint version: cfn-lint 0.35.1

Some resources supported by aws cloudformation package return E3002 Expecting an object...; they should instead return W3002 This code may only work with package cli command... when the resource value is a string.

Example:

$ cfn-lint --version
cfn-lint 0.35.1

$ cat myTemplate.yml 
Resources:

  myStateMachine:
    Type: AWS::StepFunctions::StateMachine
    Properties:
      RoleArn: myRoleArn
      DefinitionS3Location: myLocalDefinitionFile.json

$ cfn-lint myTemplate.yml 
E3002 Expecting an object at Resources/myStateMachine/Properties/DefinitionS3Location
myTemplate.yml:7:7

My team is specifically interested in support for AWS::StepFunctions:StateMachine DefinitionS3Location. We would prefer to use package for our step function definitions so we can perform static analysis on the definition separate from the cloudformation template. That would currently require an --ignore-checks E3002 flag when validating the template, but we consider that check too critical to ignore.

Resources currently supported by package are documented at: https://docs.aws.amazon.com/cli/latest/reference/cloudformation/package.html

Exceptions for some of these resources are implemented in cfn-lint at: https://github.com/aws-cloudformation/cfn-python-lint/blob/fe0af928a4ab26a6cedfd76564a26c9a4120b14f/src/cfnlint/rules/resources/properties/Properties.py#L179-L184 https://github.com/aws-cloudformation/cfn-python-lint/blob/fe0af928a4ab26a6cedfd76564a26c9a4120b14f/src/cfnlint/rules/resources/properties/PropertiesTemplated.py#L42-L47

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
asjohnston-asfcommented, Sep 8, 2020

Thanks for the quick turnaround!

0reactions
ozbillwangcommented, Oct 12, 2022

@stevehaneytrailblazer

Of course , you can ignore as work around if this problem can be fixed currently. But this is not the right way.

The problem here is, the definiation for this error , it is not error(Exxxx), it is changed to warning (Wxxxx)

Hope you get the point.

E3002 to W3002

But for Warning, should not fail the check. echo $? is 4 means, the check is failed which is not

Read more comments on GitHub >

github_iconTop Results From Across the Web

Return W3002 instead of E3002 for additional resources ...
Some resources supported by aws cloudformation package return E3002 Expecting an object... ; they should instead return W3002 This code may only ...
Read more >
cfn-lint Changelog
Fix rule [E3002](https://github.com/awslabs/cfn-python-lint/blob/master/docs/ ... New CloudFormation spec patch to not require CidrBlock on resource type ...
Read more >
cfn-lint
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 >
Incident Response
Spawns new processes that are not known child processes ... Tip: Click an analysed process below to view more details. Analysed 3 processes...
Read more >
Full text of "Polk's Indianapolis (Marion County, Ind.) city ...
This is one of more than 1,000 Di- rectory Libraries installed in cities and ... the new Exchange Stock Yards was built, supplementing...
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