ခဏလေး ဒီလိုပဲ စဉ်းစားကြည့်
AWS Console က browser-based UI ပါ — visual ကြည့်ရလွယ်ပေမယ့် repetitive task (server ၁၀ ခု create) အတွက် manual click ခက်ခဲပါတယ်။ AWS CLI ကို install/configure ပြီးရင် `aws <service> <command>` ဆိုတဲ့ pattern နဲ့ command line ကနေ AWS resource ကို manage လုပ်လို့ရပါတယ် — script ထဲ ထည့်ရေးပြီး automate လုပ်လို့ရပါတယ်။ `aws configure` command ကို run ရင် Access Key ID, Secret Access Key, default Region, output format ကို setup လုပ်ရပါတယ် (IAM User ကနေ ရရှိထားတဲ့ credential).
လက်တွေ့ scenario နဲ့ ချိတ်ကြည့်မယ်
`aws s3 ls` run ရင် account ထဲက S3 bucket အားလုံးကို list ပြပေးပါတယ် — Console ဖွင့်ပြီး click ချစရာ မလိုတော့ပါ။ Terraform (တခြား tutorial) ကလည်း background မှာ AWS CLI/SDK ကို အသုံးပြုပြီး AWS API ကို ခေါ်တာပါ — CLI ကို ကိုယ်တိုင် ရင်းနှီးထားရင် Terraform ရဲ့ error message တွေကိုပါ ပိုနားလည်ပါလိမ့်မယ်.
အတူတူ ကြည့်မယ်
# Configure the CLI with your IAM user's credentials
aws configure
# List S3 buckets
aws s3 ls
# List EC2 instances
aws ec2 describe-instances
# Check which identity the CLI is using
aws sts get-caller-identity$ aws sts get-caller-identity
{
"UserId": "AIDAEXAMPLE123",
"Account": "123456789012",
"Arn": "arn:aws:iam::123456789012:user/developer-1"
}၅ မိနစ် စမ်းကြည့်
AWS CLI ကို install လုပ်ပြီး `aws configure` run ကာ IAM User credential ဖြင့် setup ကြည့်ပါ — `aws sts get-caller-identity` run ပြီး correct identity ဖြစ်နေတာ confirm လုပ်ကြည့်ပါ။
သတိလေးတစ်ချက်
`~/.aws/credentials` file ထဲမှာ access key ရှိနေတာကို သတိထားပါ — laptop shared/public ဖြစ်နေရင် ဒီ file ကို access ခံနိုင်ပါတယ်, disk encryption ကို ဖွင့်ထားသင့်ပါတယ်။