Pages

Wednesday, December 1, 2021

AWS CLI using Role and MFA

 AWS CLI using Role and MFA

1. Setting AWS CLI Credential location : ~/.aws/credentials

[myuser]
aws_access_key_id = xxxx
aws_secret_access_key = xxxx


2. Setting AWS CLI Config location : ~/.aws/config

[profile myusermfa]
region = yourregion
role_arn = arn:aws:iam::xxAccountIDxx:role/xxRoleNamexx
source_profile = myuser
mfa_serial = arn:aws:iam::xxAccountIDxx:mfa/myuser
role_session_name = Session_MyUser_MFA

3. Access AWS CLI using profile

aws s3 ls s3:// --profile=myuser

Tuesday, October 5, 2021

Powershell Remove-Item Fast

Remove item in Windows via GUI will take some time because it will scan all files before delete.

To speed up time, we don't need to scan it.
One of fast method is using Powershell

Remove-Item -path ./* -recurse

ShareThis