Skip to main content

Command Palette

Search for a command to run...

Difference between IAM user directly attach policy and IAM user assuming an IAM role

Updated
2 min read
Difference between IAM user directly attach policy and IAM user assuming an IAM role

အားလုံးဘဲ မင်္ဂလာပါ။

ဒီနေ့ sharing လုပ်ပေးချင်တာကတော့ IAM user တွေမှာ policy ကို directly attach လုပ်ပြီး သုံးတာနဲ့ Roles ကို assume လုပ်ပြီး သုံးတာ ဘာကွာခြားမှုရှိလဲ ဆိုတာကို ဆွေးနွေးသွားမှာ ဖြစ်ပါတယ်။

IAM user မှာ policy ကို directly attach လုပ်ပြီး သုံးတဲ့ အခါမှာ ဘယ်လို အလုပ်လုပ်သလဲ ဆိုတော့ user ‌ သည် long-term credentials (username/password or access key) ကို သုံးပြီး ဝင်ရောက်ပါတယ်။

Long-term credentials ဖြစ်တဲ့ (Username/password or access key )တို့သည် ‌leak ဖြစ်သွားနိုင်ပါသည်။ ထို့ကြောင့် security point of view အရ ကြည့်မယ်ဆိုရင် Risk ရှိနိုင်ပါတယ်။

ဘယ်လိုအခါမျိုးမှာ policy ကို direct attach လုပ်ပြီးသုံးသင့်လဲဆို ‌တော့ user သည် ဒီ permission ကို ဘဲ အမြဲသုံး ဖို့ လိုအပ်တဲ့ အခါမှာ မျိုးမှာ ဖြစ်စေ ၊ minimal permission ‌ ဖြစ်တဲ့ read-only access ကိုလိုအပ်တဲ့အခါမျိုးမှာဖြစ်‌စေ သုံးသင့်ပါတယ်။

E.g - Mg Mg ဆိုတဲ့ user ကို S3RealonlyAccess ‌‌policy ကို directly attach ပေးထားမယ်ဆို ရင် အဲ့ user login ဝင်တိုင်း S3 Bucket ‌တွေကို အမြဲ readonly access ရနေမှာ ဖြစ်ပါတယ်။

IAM user မှာ Roles ကို assume လုပ်ပြီး သုံးတဲ့ အခါမှာ ဘယ်လို အလုပ်လုပ်သလဲဆိုတော့ user သည် permission တစ်ခုကို ခဏ ငှားသုံး တဲ့ပုံစံနဲ့ အလုပ်လုပ်ပါတယ်။

Credentials အတွက်ကို AWS STS( Security Token Service) ကနေ temporary credentials ‌‌ တစ်ခု ထုတ်ပေးပါတယ်။ အဲ့ credentials သည် time limit ရှိပါသည်။ Temporary credentials ဖြစ်တဲ့ အတွက် security point of view အရ ကြည့်မယ်ဆိုရင် long-term credentials ထက် ပို ပြီး safe ‌ ဖြစ်ပါတယ်။

Cross-account access ကို လည်းSupport လုပ်ပေးတဲ့ အတွက် AWS multi-account setup ‌တွေ အတွက် လည်း အဆင်‌ပြေပါတယ်။

Roles ကို ဘယ်လိုနေရာမျိုးမှာ သုံးသင့်လဲဆိုရင် user တစ်‌ယောက်ကို permissions အမြဲ‌ ပေးမထားချင်ဘူး၊ လိုအပ်တဲ့ အခါမှ သာ အဲ့ permissions ကို သုံးစေချင်တယ်ဆိုရင် Roles ကို သုံးသင့်ပါတယ်။

e.g - Mg Mg ဆိုတဲ့ user ကို S3FullAccess ‌‌ ‌‌ပေးချင်တယ် အမြဲတမ်းလည်း မဟုတ်ဘူး လိုအပ်တဲ့အခါမှာ သာ S3Fullaccess ‌‌ပေးသုံးချင်တယ်ဆိုရင် roles ကို သုံးသင့်ပါတယ်။ ဒီ Roles ကို သုံးလိုက်တဲ့ အချိန်လေးမှာ AWS STS ကနေ ထုတ်ပေးတဲ့ Temporary credentials လေးတစ်ခုကို သုံးပြီး S3FullAccess ရနေမှာဘဲဖြစ်ပါတယ်။

More from this blog

Infrastructure ကိုင်ပြီး အိပ်ရေးမပျက် ချင် လျှင် ဒါမျိုး Alarms လုပ် 🔥🔥🔥

High Level ရေးထားတာပါ ဒါပေမဲ့ လွယ်ပါတယ် ​ကိုယ့်မှာ AWS Infra တွေရှိတယ်ဆို တွေ့သမျှ metric တွေကို alarms တွေလုပ်ပြီး notification ယူမနေဘဲ တကယ် effective ဖြစ်တဲ့ metric တွေကိုမှ CloudWatch ရဲ့ alarm feature တွေနဲ့ ပေါင်းပြီး ပို့စေချင်ပါတယ်။ ​ဥပမာ prod...

Jan 17, 20263 min read159
Infrastructure ကိုင်ပြီး အိပ်ရေးမပျက် ချင် လျှင်  ဒါမျိုး Alarms လုပ် 🔥🔥🔥

How to connect On Premises Network and Cloud (AWS)? (Part-2)

ကိုယ့်ရဲ့ ‌data center (on-prem) network နဲ့ AWS ချိတ်ဆက်ဖို့ လိုလာပြီဆိုရင် ဘယ်လို ချိတ်ဆက်ကြမလဲ? အပိုင်း (၂) မှာ တော့ Direct connect အကြောင်းကို ဆွေးနွေး သွားမှာ ဖြစ်ပါတယ်။ အပိုင်း (၁) Site-to-site VPN အကြောင်းကို လေ့လာချင်ရင်တော့ အောက်ပါ link မှာ ...

Dec 20, 20253 min read224
How to connect On Premises Network and Cloud (AWS)? (Part-2)

How to connect On Premises Network and Cloud (AWS)? (Part-1)

ကိုယ့်ရဲ့ ‌data center (on-prem) network နဲ့ AWS ချိတ်ဆက်ဖို့ လိုလာပြီဆိုရင် ချိတ်ဆက်နိုင်တဲ့ နည်း (၂) နည်း ရှိပါတယ်။ 1. Site-to-Site VPN (Virtual Private Network) 2. Direct connect Site-to-Site VPN - On-prem network နဲ့ AWS resources တွေ ချိတ်ဆက်တဲ့...

Dec 12, 20252 min read262
How to connect On Premises Network and Cloud (AWS)? (Part-1)

Accessibility for Designer

လွန်ခဲ့တဲ့အပတ်က ရုံးက Designer တွေနဲ့ တော်ကီပွားရင်း Accessibility နဲ့ပတ်သတ်တာတွေ သူတို့ကို ရှင်းပြဖြစ်တယ်။ ကိုယ်တိုင်ကလည်း အရင်ကတည်းက ဒီ topic ကိုစိတ်ဝင်စားလို့ လေ့လာနေတာဆိုတော့ အခွင့်အရေးရရင် ရသလို sharing လုပ်ဖြစ်တယ်။ အဓိကက Accessibility နဲ့ပတ်သတ်...

Nov 21, 20253 min read69
Accessibility for Designer

VPC Endpoint

အားလုံးဘဲ မင်္ဂလာပါ။ ဒီနေ့ sharing လုပ်ပေးချင်တာကတော့ VPC Endpoint အကြောင်းဘဲဖြစ်ပါတယ်။ VPC Endpoint ဆိုတာ VPC နဲ့ AWS services တွေ ကို public Internet ကို အသုံးမပြုဘဲနဲ့ Privately connect လုပ်ပေးတာ ဖြစ်ပါတယ်။ Internet Gateway, NAT Gateway နဲ့ Public...

Nov 18, 20252 min read97
VPC Endpoint
M

Myanmar Technical Blog

108 posts

Cloud, Linux, DevOps, Docker, Security အစရှိတဲ့ နည်းပညာများ အကြောင်းကို မြန်မာလို ပြန်လည်မျှဝေပေးမယ့် Blog ပဲဖြစ်ပါတယ်ခဗျာ...