# AWS CLI Login ###### tags: `AWS` --- ## Prepare * [Installing AWS CLI](https://docs.aws.amazon.com/en_us/cli/latest/userguide/installing.html) * AWS account note: pip 安裝 AWS CLI (pip install awscli --upgrade --user), 並把 aws 指令加入本機 PATH 裡頭 --- ## Config * ~/.aws/config ``` [default] region=ap-northeast-1 output=json [profile mfa] source_profile=default mfa_serial=arn:aws:iam::xxxxxxxxx:mfa/burgess.chen [profile dev-1] region=ap-northeast-1 ... ``` note: ~/.aws/config : profile 分類 --- ## Credentials * ~/.aws/credentials ``` [default] aws_access_key_id=ooxxooxxooxx aws_secret_access_key=ooxxooxxooxx [mfa] aws_access_key_id=ooxxooxxooxx aws_secret_access_key=ooxxooxxooxx aws_session_token=ooxxooxxooxx [dev-1] ... ... ``` 指定 profile,無指定會使用 default 設定 ``` aws [command] --profile dev-1 ``` note: 對應 config, 在 credentials 將會設定 `aws_access_key_id`, `aws_secret_access_key` 等等資訊。
×
Sign in
Email
Password
Forgot password
or
Sign in via Google
Sign in via Facebook
Sign in via X(Twitter)
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
Continue with a different method
New to HackMD?
Sign up
By signing in, you agree to our
terms of service
.