fix(ci): authenticate bedrock drift check via GitHub OIDC - #19
Merged
Merged
Conversation
The workflow referenced AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY secrets that were never set on this repo, so every scheduled run failed with CredentialsProviderError. Switch to an OIDC-assumed read-only role so a public repo holds no long-lived AWS keys. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
check-bedrock-modelsworkflow has failed on every scheduled run since it was added. The job passesAWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEYfrom repo secrets, but this repo has no Actions secrets — they interpolate to empty strings and the SDK credential chain fails:The drift checker itself is fine — run locally against real credentials it completes cleanly (no drift, plus the usual not-found / novel-model lists).
Change
Since this repo is public, authenticate via GitHub OIDC rather than storing long-lived keys:
id-token: writeto the job permissionsaws-actions/configure-aws-credentials@v5, ARN from the repo variableBEDROCK_DRIFT_ROLE_ARNRequired before this works
https://token.actions.githubusercontent.com, audiencests.amazonaws.com).token.actions.githubusercontent.com:sub=repo:jambonz/llm:ref:refs/heads/main, with an inline policy granting onlybedrock:ListFoundationModelsandbedrock:ListInferenceProfiles.BEDROCK_DRIFT_ROLE_ARNto that role ARN.Verify with
workflow_dispatchrather than waiting for the Monday cron.🤖 Generated with Claude Code