Install AWS CLICài AWS CLI
Quick reference for installing, configuring and verifying the AWS CLI on any platform.Tra cứu nhanh lệnh cài đặt, cấu hình và kiểm tra AWS CLI trên mọi nền tảng.
No matches found.Không tìm thấy mục nào.
InstallCài Đặt 6
-
brew install awscliInstall on macOS via HomebrewCài trên macOS qua Homebrew
Fastest on macOSCách nhanh nhất trên macOS
-
curl https://awscli.amazonaws.com/AWSCLIV2.pkg -o AWSCLIV2.pkgDownload the macOS installer (.pkg)Tải bộ cài macOS (.pkg)
-
sudo installer -pkg AWSCLIV2.pkg -target /Install the downloaded .pkgCài file .pkg vừa tải
-
curl https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o awscliv2.zipDownload the Linux installer (x86_64)Tải bộ cài Linux (x86_64)
-
unzip awscliv2.zip && sudo ./aws/installUnzip and install on LinuxGiải nén và cài trên Linux
-
msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msiInstall on Windows (PowerShell/CMD)Cài trên Windows (PowerShell/CMD)
ConfigureCấu Hình 3
-
aws configureEnter Access Key, Secret Key, region, outputNhập Access Key, Secret Key, region, output mặc định
-
aws configure listShow the current configurationXem cấu hình hiện tại
-
aws configure ssoSet up login via IAM Identity Center (SSO)Cấu hình đăng nhập qua IAM Identity Center (SSO)
VerifyKiểm Tra 2
-
aws --versionCheck the installed versionKiểm tra phiên bản đã cài
-
aws sts get-caller-identityShow the current identity (account, user/role)Xem danh tính đang dùng (account, user/role)
The surest way to know who you areCách chắc chắn nhất để biết bạn đang là ai
Golden rulesQuy tắc vàng
- Do not use root account access keys — create a dedicated IAM user/roleKhông dùng Access Key của root account — tạo IAM user/role riêng
- Set a default region that matches where you deployĐặt region mặc định khớp với nơi bạn deploy để tránh nhầm
- Prefer aws configure sso over long-lived access keysƯu tiên aws configure sso thay vì lưu Access Key dài hạn
- Run aws sts get-caller-identity to confirm the right account before actingChạy aws sts get-caller-identity để xác nhận đúng account trước khi thao tác
Tap a card to reveal the answer.Bấm vào thẻ để xem đáp án.
-
Command to check the AWS CLI version?Lệnh kiểm tra phiên bản AWS CLI?
aws --version
-
Command to see which identity you are using?Lệnh xem bạn đang đăng nhập bằng danh tính nào?
aws sts get-caller-identity
-
Basic command to configure credentials?Lệnh cấu hình credentials cơ bản?
aws configure