{"slug": "get-the-aws-keys-off-your-computer", "title": "Get the AWS Keys Off Your Computer", "summary": "A Claude Code prompt published by Steven Mays, lead AI engineer, walks developers through replacing long-lived AWS access keys with short-lived `aws login` credentials, after October 2026's \"Black October\" wave of AI-found vulnerabilities and package malware that targeted AWS keys and AI tool sessions. Mays cites Aikido listing `~/.aws/credentials` among the targets of `tensorlake` `0.5.144` and Datadog reporting that `litellm` `1.107.0` malware collects AWS credentials and sessions for Claude, Codex, Gemini, Cursor and Copilot. The switch is incomplete: `aws login` credentials refresh every 15 minutes for a session of at most 12 hours but still land on disk in `~/.aws/login/cache`, the AWS CLI 2.39.3 checks the shared credentials file before login so an old key still wins until deleted, and AWS's SDK reference table as of 2026-11-06 lists login credentials as unsupported in 4 of 17 SDKs and tools, including the SDK for Go V2 and the SDK for JavaScript 2.x.", "body_md": "# Get the AWS Keys Off Your Computer\n\nBlack October put AI-found bugs in the headlines, and the same month, package malware went after AWS keys on developer machines. Here is a Claude Code prompt that replaces long-lived keys with short-lived credentials, and what the switch still leaves exposed.\n\n[Steven Mays Lead AI Engineer](https://mays.co/about)\n\n7 min read\n\nOctober 2026 picked up a name: “Black October”. It was a name that was circulating X (formerly twitter) to describe the deluge of cybersecurity incidents since frontier models started finding serious bugs.\n\nAWS keys on developer machines are a major target, and we need to start taking cybersecurity seriously.\n\n## What AI Changed\n\nAI models are finding serious bugs. CNBC reports that researchers at Wiz and Calif found the PHP flaws with AI models, and former CISA director Chris Krebs told CNBC that “3% of all critical vulnerabilities ever discovered have been found in the last month.”\n\nA stolen credential skips that work. Wiz says most of its incidents are still being analyzed, but Fireworks, Zeabur, and Lightning “all attribute their incident root causes to credential access.”\n\nOctober’s package malware went looking for AWS keys and AI tool sessions. Aikido lists `~/.aws/credentials` among the targets of `tensorlake` `0.5.144`. Datadog says the `litellm` `1.107.0` malware collects AWS credentials and “sessions for Claude, Codex, Gemini, Cursor, Copilot and other AI coding tools”.\n\n## What `aws login` Changes\n\nAWS docs say `aws login` issues credentials that refresh every 15 minutes, for a session of at most 12 hours. They still land on disk, in `~/.aws/login/cache`. I infer a stolen cache works until the session ends, up to 12 hours, but I didn’t test that. Wiz says the Shai-Hulud 2.0 malware also looks for short-lived tokens.\n\n## The Old Key Still Wins\n\nAfter `aws login`, the old key still wins until you remove it, because the AWS CLI 2.39.3 source checks the shared credentials file before login. So `aws sts get-caller-identity`, the check in AWS’s own walkthrough, passes against the old key and proves nothing.\n\nThe CLI also refuses a login on a profile that holds a key, so hide the file: `AWS_SHARED_CREDENTIALS_FILE=/dev/null aws login`.\n\n## The Claude Code Prompt\n\nRead it before you paste it.\n\n## Doing It by Hand\n\nThe [AWS CLI guide](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sign-in.html) has the `aws login` steps, and the [IAM guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/id-credentials-access-keys-update.html) covers deactivating and deleting a key. Keep this order: sign in with `AWS_SHARED_CREDENTIALS_FILE=/dev/null`, run `aws configure list` with the same override and require type `login`, remove the key from `~/.aws/credentials`, repeat the check without the override, deactivate the key in IAM, and delete it after a few days with no breakage.\n\n## Trade-offs\n\n`aws login` still leaves live credentials on disk. I found no AWS doc on revoking a session, and `aws logout` only clears the local cache. Some tools can break: on 2026-11-06, the AWS SDK reference table lists login credentials as unsupported in 4 of its 17 SDKs and tools, including the SDK for Go V2 and the SDK for JavaScript 2.x. Check which SDK your deploy tool uses.\n\nFor several accounts, use IAM Identity Center. For CI, use GitHub’s OIDC integration, not stored keys. For one person in one account, pick `aws login`. **The tradeoff:** you sign in again at least every 12 hours, and a tool on an unsupported SDK needs another credential source.\n\n## Resources and References\n\n- [CNBC](https://www.cnbc.com/2026/10/23/php-vulnerabilities-ai-cybersecurity.html) : “Black October” and the AI-found PHP flaws\n- [NBC News](https://www.nbcnews.com/tech/security/hackers-php-flaws-cybersecurity-crisis-rcna605112) : the early read on successful attacks\n- [BleepingComputer](https://bleepingcomputer.com/news/security/cisa-confirms-php2shell-vulnerabilities-now-exploited-in-attacks) : the CISA listing\n- [Wiz on Black October](https://www.wiz.io/blog/black-october-for-ai-developer-platforms) : the AI developer platform attacks\n- [Aikido](https://www.aikido.dev/blog/tensorlake-npm-package-compromised) : the`tensorlake` compromise\n- [Datadog](https://securitylabs.datadoghq.com/articles/litellm-compromised-pypi-docker/) : the`litellm` compromise\n- [Wiz on Shai-Hulud 2.0](https://www.wiz.io/blog/shai-hulud-2-0-ongoing-supply-chain-attack) : behavior and credential counts\n- [AWS Security Blog](https://aws.amazon.com/blogs/security/simplified-developer-access-to-aws-with-aws-login/) : the`aws login` walkthrough\n- [AWS SDK reference](https://docs.aws.amazon.com/sdkref/latest/guide/feature-login-credentials.html) : the SDK support table\n- [AWS CLI 2.39.3 source](https://github.com/aws/aws-cli/blob/2.39.3/awscli/botocore/credentials.py) :`ProfileProviderBuilder.providers()` lists the shared credentials file before login\n- [Identity Center instances](https://docs.aws.amazon.com/singlesignon/latest/userguide/identity-center-instances.html) : what it needs\n- [GitHub OIDC in AWS](https://docs.github.com/en/actions/how-tos/secure-your-work/security-harden-deployments/oidc-in-aws) : Actions without stored keys", "url": "https://wpnews.pro/news/get-the-aws-keys-off-your-computer", "canonical_source": "https://mays.co/get-aws-keys-off-your-computer", "published_at": "2026-11-06 00:00:00+00:00", "updated_at": "2026-11-14 15:21:29.113336+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "ai-safety", "developer-tools"], "entities": ["AWS", "Steven Mays", "Claude Code", "Aikido", "Datadog", "Wiz", "Chris Krebs", "CISA"], "also_reported_by": [], "takeaway": "Run `AWS_SHARED_CREDENTIALS_FILE=/dev/null aws login`, confirm via `aws configure list` that the credential type is `login`, then deactivate and delete the old key in IAM — but note the login cache still sits on disk for up to 12 hours and login credentials are unsupported in 4 of 17 AWS SDKs and to", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/get-the-aws-keys-off-your-computer", "markdown": "https://wpnews.pro/news/get-the-aws-keys-off-your-computer.md", "text": "https://wpnews.pro/news/get-the-aws-keys-off-your-computer.txt", "jsonld": "https://wpnews.pro/news/get-the-aws-keys-off-your-computer.jsonld"}}