From 0bdbe669571f9844ca25d269dedb4a2084f0cf3b Mon Sep 17 00:00:00 2001 From: licjun_aws Date: Thu, 2 Apr 2026 13:00:25 -0700 Subject: [PATCH] fix: restrict cfn-lint schema update to us-east-1 to avoid pickle error cfn-lint -u fails with a multiprocessing pickle error when updating schemas for all regions. Restricting to us-east-1 avoids the issue since schema structure validation doesn't require region-specific schemas. See https://github.com/aws-cloudformation/cfn-lint/issues/4379 --- bin/run_cfn_lint.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/run_cfn_lint.sh b/bin/run_cfn_lint.sh index 92c448eac..0ce5bfb3f 100755 --- a/bin/run_cfn_lint.sh +++ b/bin/run_cfn_lint.sh @@ -11,10 +11,12 @@ fi "${VENV}/bin/python" -m pip install cfn-lint --upgrade --quiet # update cfn schema with retry logic (can fail due to network issues) +# --regions us-east-1 avoids a cfn-lint bug where updating all regions causes a +# multiprocessing pickle error. See https://github.com/aws-cloudformation/cfn-lint/issues/4379 MAX_RETRIES=3 RETRY_COUNT=0 while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do - if "${VENV}/bin/cfn-lint" -u; then + if "${VENV}/bin/cfn-lint" -u --regions us-east-1; then echo "Successfully updated cfn-lint schema" break else