ci: split Lambda layer publish credentials by region - #633
Conversation
| role-to-assume: ${{ secrets.LAYER_PUBLISH_ROLE_ARN }} | ||
| role-session-name: otelLayerPublish | ||
| aws-region: us-east-1 | ||
| role-to-assume: ${{ secrets[matrix.publish_target.role_secret] }} |
| - name: Resolve publish targets | ||
| id: publish-targets | ||
| env: | ||
| LAYER_REGIONS: ${{ inputs.regions || vars.LAYER_PUBLISH_REGIONS }} |
There was a problem hiding this comment.
Codex AI review
[P1] Preserve access to the environment-scoped region setting. This lookup moved from publish-layer, which declares the lambda-layer-publish environment, into build-distributions, which does not. Consequently an environment-level LAYER_PUBLISH_REGIONS is unavailable here, so the empty value selects every configured region, potentially publishing beyond the requested scope or failing on unrelated role secrets. Resolve targets in a job that declares the environment, or migrate and document this as a repository-level variable.
Codex AI reviewFound one high-severity release workflow regression. The YAML tests do not cover GitHub environment-scoped variable availability. Reviewed commit |
Claude AI reviewNo blocking findings. This CI-only PR splits the Lambda layer publish job into a credential-scoped matrix, and the logic is sound:
Residual (non-blocking, operational) risk: the default target set now includes China and GovCloud. On any release where Reviewed commit |
Summary
mainTesting
python -m pytest .github/scripts/tests/test_resolve_layer_publish_targets.py .github/scripts/tests/test_lambda_layer_publish_workflow.py .github/scripts/tests/test_build_lambda_layer.py .github/scripts/tests/test_parse_sdk_branch.py .github/scripts/tests/test_resolve_layer_sdk_version.py(18 passed)actionlint .github/workflows/lambda-layer-publish.yml .github/workflows/test-parser.yml