How to Rotate AWS Access Keys (and Azure, Google Cloud Keys)
To rotate an AWS access key without downtime, create a second key, move your apps to it, deactivate the old key, test, and only then delete it. The same idea works on Azure and Google Cloud, and where you can, use roles or federated identities so you have no long-term key to rotate at all. The Radware and Rackspace Spot breach reports, published 24 Nov 2026, are a good reminder to do this for keys held by vendors too.
Most small teams I know rotate keys only when something goes wrong. The two breach reports this week are a decent excuse to do it before that.
A caution first. Both incidents rest on one source, BleepingComputer, and the details were early at the time. Neither company told customers to rotate AWS IAM user keys in general. Their advice was narrower, as below.
What did Radware and Rackspace actually say?
Radware. According to BleepingComputer (24 Nov 2026), attackers reached customer account details and cloud access keys through an internal Cloud WAF management API that Radware says was reachable from the internet without authentication. The report says unauthorized access happened on 19 Nov 2026.
For a subset of customers, the exposed data included credentials used for Cloud WAF log export to self-managed AWS S3, Azure Blob Storage or SFTP. Radware advised affected AppSec (WAF, BOT) customers to rotate those log-export credentials and review storage access logs since at least 19 Nov. Radware was still investigating whether keys were misused. Some customers reported AWS alerts about an unfamiliar IP trying to reach their log-export buckets.
So if you never used Radware Cloud WAF log export, nothing here says your AWS keys were exposed. If you did, rotate that credential and check your bucket logs.
Rackspace Spot. According to BleepingComputer (24 Nov 2026), attackers got in on 17 Nov 2026 with compromised credentials. Rackspace said they “may have read cluster Secrets and files on storage volumes.” For Spot customers, it said to treat API tokens, refresh tokens, kubeconfigs and Kubernetes Secrets as potentially compromised even without a breach notice, and to review logs back to 16 Nov.
Spot is being shut down. Customers must migrate and download data by 8 Dec 2026, 5 PM Central Time (as of November 2026). Rackspace had not said whether it would extend that.
That advice is for Spot users. Still, anything stored as a Kubernetes Secret on Spot, including cloud keys, is worth rotating.
Why should a small Ugandan team care?
Because the Radware keys were ones customers had given to a vendor. It is easy to track keys in your own repos and forget the ones sitting in someone else’s dashboard.
I did not research Ugandan cloud regions, local pricing or provider availability for this piece, so I won’t guess at them. The method below is the same wherever your servers are.
If you handle clients’ personal data, a breach may also carry a legal duty. Search summaries say Uganda’s Data Protection and Privacy Act 2019 has a breach notification section (section 23), and DLA Piper summarises it as a duty to notify the Personal Data Protection Office. I could not open the official text, and summaries disagree on timing. Whether it applies to you depends on your role with the data. Get proper legal advice.
How often should I rotate keys?
There is no single rule across clouds:
- AWS says to rotate long-term keys “when needed”, for example when an employee leaves (AWS IAM best practices, current docs).
- Google says at least every 90 days, and immediately if you suspect compromise (Google Cloud, current docs).
- Microsoft caps Entra client secrets at 24 months and recommends under 12 (Microsoft Learn, updated Nov 2026).
My suggestion, not from those docs: pick 90 days as one team rule for every long-term key, and rotate sooner when someone leaves or a vendor holding your key is breached.
How do I rotate AWS access keys?
First ask if you need a key at all. AWS recommends temporary credentials (IAM roles, IAM Identity Center) over long-term keys. It still accepts long-term keys for things like WordPress plugins or third-party clients that can’t use Identity Center (AWS IAM best practices).
If you must keep a key, this is the no-downtime method from the AWS docs:
- Keep the old key active and run
aws iam create-access-key. The user now has two active keys. - Update every app and tool to the new key.
- Run
aws iam get-access-key-last-usedon the old key. AWS suggests waiting several days. - Run
aws iam update-access-keyto set the old key toInactive, even if it shows no use. - Confirm everything works. If something breaks, AWS’s steps say to reactivate the old key and fix that app.
- After a safe period, run
aws iam delete-access-key.
To find old keys, add the “Access key age” column in the IAM console under Manage columns. The secret is only retrievable when the key is created. If you lose it, delete the key and create a new one.
What if I think an AWS key is already compromised?
The AWS page I read has no emergency procedure, so this is my own judgment, not AWS guidance:
- Check how many keys the user already has. The method above ends with two keys on one user, so you may need to deactivate one before creating another.
- Look at what the user is allowed to do. If it can manage IAM, a new key under that user could be abused too.
- Deactivate the suspect key now rather than waiting several days.
- Check CloudTrail for activity you don’t recognise, and for new users, roles or keys you didn’t create.
If you are unsure, get someone experienced on a call before you start deleting things.
How do I rotate Azure (Entra) app secrets?
Microsoft recommends managed identities where your code runs on a service that supports them (Microsoft Learn). Its page says client secrets should not be used in production, and recommends certificates or federated credentials. Federated credentials (GitHub Actions or Kubernetes, for example) avoid managing secrets (Microsoft Learn).
If you still need a secret:
- Go to Entra admin center > App registrations > your app > Certificates & secrets.
- Add a new client secret with a description and an expiry under 12 months.
- Copy the value now. It is never shown again.
- Update your app or Key Vault, then test.
- Remove the old secret from the same Certificates & secrets page once the test passes.
Microsoft’s page covers adding credentials, not removing them. I am assuming the delete option sits on that same page, so confirm it in the portal.
If an Azure DevOps service connection created the service principal, update the secret from the Azure DevOps portal, not directly in Entra.
How do I rotate Google Cloud service account keys?
Google says to prefer an alternative to keys when the app already has an identity Google Cloud recognises (Google Cloud). If you need keys:
- Find old keys with Cloud Asset Inventory:
gcloud asset search-all-resources --scope="organizations/<ID>" --query="createTime < <date>" --asset-types="iam.googleapis.com/ServiceAccountKey" --order-by="createTime" - Create a new key for the same service account.
- Replace the old key everywhere.
- Disable the old key and monitor.
- Delete it.
Only the search command comes from the page I read. Google links separate guides for create, disable and delete, so take those commands from there.
Google also says not to store service account keys in Secret Manager, and not to rely on key expiry as your rotation method because it can cause outages. Set up Essential Contacts so compromised-key notices reach a real person.
How do I stop keys leaking from Git?
Turn on GitHub secret scanning. It checks full history on all branches, plus issues, PRs, discussions and wikis. It is free on public repos, while private repos need GitHub Secret Protection (GitHub docs, current). I haven’t checked current plan prices, so look at GitHub’s pricing page.
Turn on push protection too. At repo level it needs GitHub Secret Protection and is off by default. Anyone with write access can bypass a block by giving a reason (GitHub docs, current).
If a key leaks, GitHub says rotating the credential is the priority. Rewriting history is slow and often unnecessary once the credential is revoked.
How do I limit the damage if a key leaks?
Give each key the smallest permission it needs.
- AWS: start with managed policies, then move to customer-managed ones. IAM Access Analyzer can generate policies from CloudTrail activity, and last-accessed information helps you remove unused credentials (AWS).
- Azure: assign roles at the narrowest scope. Permissions inherit downward (Microsoft Learn).
A log-export key should only be able to write to one bucket. That is my example, not Radware’s setup.
Common mistakes
- Deleting the old AWS key before testing. AWS’s steps deactivate first.
- Scrubbing Git history while the key is still live.
- Rotating only keys you own and forgetting ones a vendor holds.
- Not checking logs. Radware told affected customers to look back to 19 Nov, and Rackspace told Spot users to look back to 16 Nov.
- Using Azure client secrets in production, or storing a Google key in Secret Manager.
What would I do this week?
List every key a vendor holds, then every Kubernetes Secret, and rotate those first. If you used Radware Cloud WAF log export, rotate that credential and check your storage logs. If you use Rackspace Spot, treat kubeconfigs and Secrets as exposed and plan for the 8 Dec deadline.
The AWS, Google Cloud and GitHub docs show no dates, so treat them as current docs as of November 2026.
Frequently asked questions
Do I need to rotate my AWS keys because of the Radware breach?
Only if you were an affected Radware AppSec customer who used Cloud WAF log export to AWS S3. Radware advised those customers to rotate their log-export credentials and check storage logs since at least 19 Nov 2026. Other AWS keys were not mentioned in the report.
Should I delete the old AWS key straight away?
No. AWS's steps have you deactivate the old key first, test your apps, and delete it after a safe period.
Can I avoid rotating keys altogether?
Often, yes. AWS recommends roles or IAM Identity Center, Microsoft recommends managed identities or federated credentials, and Google says to prefer alternatives to service account keys.
Do I have to tell Uganda's data protection office about a breach?
Search summaries point to a notification duty under the Data Protection and Privacy Act 2019, but I could not read the official text and summaries disagree on timing. Ask a lawyer.
Does GitHub secret scanning work on private repos?
Private repos need GitHub Secret Protection. It is free and automatic on public repos, per GitHub's docs.
Sources
- BleepingComputer: Radware discloses breach exposing customer cloud access keys
- BleepingComputer: Rackspace shuts down Spot cloud platform after security breach
- AWS IAM best practices
- AWS: Update access keys
- Microsoft Learn: Create a service principal
- Microsoft Learn: Add credentials to an app
- Google Cloud: Service account key rotation
- GitHub Docs: About secret scanning
- GitHub Docs: About push protection
- DLA Piper: Data protection laws in Uganda
- ULII: Data Protection and Privacy Act 2019