Use lfpolicy doctor first. It checks the installed version, Python runtime,
optional extras, and AWS-related environment variables without making AWS calls.
lfpolicy doctor --output jsonWhen a workflow requires optional integrations, make the check fail early:
lfpolicy doctor --require aws --require yamlLive AWS commands need the AWS extra:
python -m pip install "lfpolicy[aws]"Offline commands such as sample, validate, audit, and plan with
--current-snapshot do not require boto3.
YAML support is optional. Install the YAML extra:
python -m pip install "lfpolicy[yaml]"JSON files work with the base package.
lfpolicy uses the caller's normal boto3 credentials and does not bypass AWS
authorization. Check the active profile, region, and IAM or Lake Formation
permissions for the command you are running.
Read-only inventory commands need permissions such as lakeformation:GetLFTag,
lakeformation:GetResourceLFTags, and lakeformation:ListPermissions.
If a consuming service executes grants or revokes after review, that service
owns the matching AWS write permissions. See aws-permissions.md.
Check that the desired-state file includes the LF-Tags, resources, and grants
you expect to manage. Live inventory is scoped from desired state, and offline
plans compare only the files you pass to --desired and --current-snapshot.
Run validation to confirm the object counts:
lfpolicy validate \
--desired policy/desired.json \
--current-snapshot snapshots/prod-current.jsonThis is expected by default. lfpolicy omits permission revokes, resource tag
removals, and LF-Tag value removals unless explicitly allowed:
lfpolicy plan \
--desired policy/desired.json \
--current-snapshot snapshots/prod-current.json \
--allow-permission-revokes \
--allow-resource-tag-removals \
--allow-lf-tag-value-removalsUse a separate review path for those plans.
--github-summary writes to the file path in the GITHUB_STEP_SUMMARY
environment variable. GitHub Actions sets it automatically. Other CI systems
should use --output markdown --output-file artifacts/lfpolicy-report.md
instead.
Confirm the exact distribution name:
python -m pip install lfpolicy
pipx install lfpolicy
uv tool install lfpolicyThe import package is lfpolicy, and the CLI is lfpolicy.