BM: Baca dalam Bahasa Melayu
World A2: Keys & Guards
Access keys: avoid them, rotate them
You will learn: why access keys are risky, what to use instead, and how to rotate one safely.
Checked with AWS 2026-11 on 1 Nov 2026
The problem
A laptop is stolen from Kancil’s car. On it: an old AWS key in a file. The key never expires. What now?
Pick one answer.
Watch
An access key: A long-lasting key pair (an ID and a secret) for an IAM user. Avoid it; prefer roles. is an ID plus a secret. It lasts until you delete it. A user can have two at most.
Try it
Swapping an old key for a new one is called rotating. Put the safe steps in order.
First step at the top. Put these in order. Use the arrows, or drag.
- Move every app to the new key
- Create a second, new key
- Switch the old key to Inactive
- Delete the old key
- Wait and check that nothing broke
Try it
Switch Bob’s old key off. Build the command.
Tap the pieces in the right order.
Predict
After you switch the old key off, an old script breaks. Can you fix it fast?
Pick one answer.
Check
Better than a long-lived key, or still risky? Swipe each one.
Swipe right for good, left for needs work. Or use the buttons.
On my laptop: aws login or aws sso login.
You did it!
You can now avoid access keys, and rotate one safely when you must.
Go deeper (optional)
AWS shows the secret part only once, when the key is made. Lost it? Delete the key and make a new one.
aws iam get-access-key-last-used tells you when a key last worked. Unused for months? Delete it. Deleting is forever, so switch it off first.
Bahasa Melayu
Laptop dicuri dari kereta Kancil. Di dalamnya: satu kunci AWS lama dalam fail. Kunci itu tak pernah luput. Apa sekarang?
Access key ialah satu ID dan satu rahsia. Ia kekal sehingga anda padam. Seorang pengguna boleh ada dua sahaja.
Tukar kunci lama dengan kunci baru dipanggil rotate. Susun langkah yang selamat.
Matikan kunci lama Bob. Bina arahannya.
Selepas anda matikan kunci lama, satu skrip lama rosak. Boleh anda baiki cepat?
Lebih baik daripada kunci jangka panjang, atau masih berisiko? Leret setiap satu.
Kini anda boleh elakkan access key, dan tukar satu dengan selamat bila terpaksa.
You finished this before. Practice is always welcome!
Official docs: Manage access keys for IAM users · aws iam list-access-keys · aws iam update-access-key · aws iam delete-access-key
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?