Skip to main content

cfn-lint rules for projects using cfn-handler custom resources

Project description

cfn-lint-cfn-handler

PyPI version Python versions License

A cfn-lint rule plugin for projects using cfn-handler custom resource handlers.

It catches misconfigurations specific to cfn-handler-based custom resources — the kind of issues cfn-lint cannot know about generically because they depend on knowing the consumer ships cfn-handler semantics.

Status: pre-release scaffolding. No rules ship yet. This README describes the intended shape; rule classes are added per the bootstrap sequence in cfn-lint-plugin-bootstrap.md §15.

Install

pip install cfn-lint cfn-lint-cfn-handler
# or with uv
uv add cfn-lint-cfn-handler

Use

cfn-lint v1+ does not auto-discover plugins. Opt in explicitly via the -a/--append-rules flag. Put the template path before -a, otherwise argparse greedily absorbs it as another rule path:

cfn-lint template.yaml -a cfn_lint_cfn_handler.rules

Or in .cfnlintrc:

append_rules:
  - cfn_lint_cfn_handler.rules

Rule catalogue

ID Severity Description
E9101 Error Custom resource references a Lambda whose Timeout is < 30s (CFN response wait risk)
E9102 Error Polling-using handler has CFN TimeoutInMinutes < a sane lower bound
E9103 Error Lambda lacks IAM permissions for events:* / lambda:*Permission when polling
W9104 Warning ServiceToken does not look like a Lambda Function ARN
W9105 Warning cfn-handler Layer ARN doesn't match the region the stack is being deployed to

Severity is encoded by the first letter of the rule ID, per cfn-lint convention (E* → error, W* → warning, I* → informational).

Configuration

Standard cfn-lint configuration applies. To disable a rule:

ignore_checks:
  - W9105

To override a rule's severity, see cfn-lint's per-rule config.

Compatibility

  • Python: 3.10+
  • cfn-lint: 1.43+

Contributing

See CONTRIBUTING.md. Larger changes go through the OpenSpec workflow in openspec/.

License

Apache-2.0. See LICENSE and NOTICE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cfn_lint_cfn_handler-0.1.1.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cfn_lint_cfn_handler-0.1.1-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file cfn_lint_cfn_handler-0.1.1.tar.gz.

File metadata

  • Download URL: cfn_lint_cfn_handler-0.1.1.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for cfn_lint_cfn_handler-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7e64dcdf113569e08b8565f70e5c95ee7721d075ef266887b9be845d40c97c49
MD5 f1eee0523505b4843b6accd3bcab8fa1
BLAKE2b-256 f59ed41cef7ce81fabc84b284dd172bd739e09f17a33d5edf643d40ca529cb70

See more details on using hashes here.

Provenance

The following attestation bundles were made for cfn_lint_cfn_handler-0.1.1.tar.gz:

Publisher: release.yml on igorlg/cfn-lint-cfn-handler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cfn_lint_cfn_handler-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for cfn_lint_cfn_handler-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7b77adc880ca1b0bfb2dcf91702f22db7e291eb6ac647e3681ae8a0df2c806bd
MD5 a0953fdb425f1825c102d0093e7a7358
BLAKE2b-256 b0d5898ad5e9c97f4002430d70bd75c7bfdca441e211a02033d318d30dbacb11

See more details on using hashes here.

Provenance

The following attestation bundles were made for cfn_lint_cfn_handler-0.1.1-py3-none-any.whl:

Publisher: release.yml on igorlg/cfn-lint-cfn-handler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page