feat(scoreboard): add --profile flag for AWS profile selection#275
Open
mkultraWasHere wants to merge 2 commits into
Open
feat(scoreboard): add --profile flag for AWS profile selection#275mkultraWasHere wants to merge 2 commits into
mkultraWasHere wants to merge 2 commits into
Conversation
Allows specifying an AWS named profile for SSM and ares transports instead of relying solely on AWS_PROFILE or the default credential chain. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds AWS named profile selection support to the scoreboard run command so users can target different AWS credential sets when using the SSM- and ares-based transports. This threads a new optional profile parameter through the scoreboard transports into the shared AWS client factory, and updates client caching to avoid cross-profile collisions.
Changes:
- Add
--profileflag todreadgoad scoreboard runand pass it into the selected transport. - Extend
scoreboard.NewSSMTransport/scoreboard.NewAresTransportandawsclient.NewClientto accept an optional profile. - Include
profilein the AWS client cache key to prevent reuse across profiles.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| cli/internal/scoreboard/transport.go | Thread profile into SSM transport construction via the shared AWS client. |
| cli/internal/scoreboard/transport_ares.go | Thread profile into ares transport construction via the shared AWS client. |
| cli/internal/aws/provider.go | Update provider construction to call NewClient with an explicit empty profile. |
| cli/internal/aws/client.go | Add optional profile support to AWS config loading and update cache keying. |
| cli/cmd/scoreboard.go | Add --profile flag and pass it into SSM/ares transport builders. |
| cli/cmd/lab_reset.go | Update AWS client creation call site to pass an explicit empty profile. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
44
to
46
| if err != nil { | ||
| return nil, fmt.Errorf("load AWS config for %s: %w", region, err) | ||
| } |
Comment on lines
66
to
68
| scoreboardRunCmd.Flags().Bool("once", false, "Fetch + verify once, print the static board, exit (no TUI)") | ||
| scoreboardRunCmd.Flags().String("profile", "", "AWS profile (overrides AWS_PROFILE)") | ||
| } |
Include profile in AWS config error message for easier debugging. Clarify --profile help text to indicate it only applies to SSM/ares transports. Co-Authored-By: Claude Opus 4.6 (1M context) <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.
Summary
--profileflag todreadgoad scoreboard runfor specifying an AWS named profile when using SSM or ares transportsNewSSMTransport,NewAresTransport, and the sharedawsclient.NewClientawsclient.NewClientnow accepts an optional profile parameter and usesawsconfig.WithSharedConfigProfilewhen non-emptyTest plan
dreadgoad scoreboard run --transport ssm --instance-id <id> --profile <profile>connects using the specified profiledreadgoad scoreboard run --transport ssm --instance-id <id>(no profile) still uses default credential chaindreadgoad scoreboard run --transport ares --instance-id <id> --profile <profile>works with ares transportlab resetand provider commands unaffected (pass empty profile)🤖 Generated with Claude Code