AWS context/profile switcher for AWS CLI and S3 clients #9689
Replies: 1 comment 2 replies
-
|
Nice work — a lightweight profile/context switcher is genuinely useful, especially when you need to drive both AWS CLI and S3-compatible clients that don’t understand the AWS config format. A few suggestions that would make a tool like this safer and more interoperable with the AWS ecosystem: Make sure it never stores long-lived credentials itself. Prefer switching via standard AWS mechanisms so everything “just works” with the AWS CLI and SDKs: Use export AWS_PROFILE=my-profile aws sts get-caller-identity If you support SSO profiles, it helps to remind users they must authenticate first: aws sso login --profile my-sso-profile If the goal is also S3-compatible clients, exporting endpoint variables can be helpful, but keep them scoped to the current shell session so users don’t accidentally leak settings into unrelated terminals. Also consider compatibility flags commonly relied on by SDK users: AWS_SDK_LOAD_CONFIG=1 This ensures SDKs load the shared config file the same way the CLI does in many environments. Finally, a “dry-run/show” mode that prints exactly what environment variables would be set (without changing anything) is great for transparency and debugging. Overall: if the tool primarily manages environment variables (AWS_PROFILE, optional AWS_ENDPOINT_URL, etc.) and avoids persisting secrets, it should play nicely with AWS CLI, SSO, and third-party S3 clients. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I've built a small CLI tool called
awsctxto simplify working with multiple AWS profiles across the CLI and other S3-compatible clients (likes3cmd,s5cmd, etc.).If you often switch between AWS profiles,
awsctxhelps by:StandardandService-SpecificAWS_PROFILE,AWS_ENDPOINT_URL, etc.).It works on both Linux and Windows shells.
This shell-based tool aimed at improving daily AWS workflows. If you're interested, feel free to check it out or suggest improvements.
🔗 GitHub - awsctx CLI tool
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions