Question 11
Domain 1: Design Secure ArchitecturesSebuah service AWS (misalnya ECS) perlu **permission untuk manage resources AWS** atas nama customer — misalnya ECS butuh akses ke ECR untuk pull images, dan ke CloudWatch untuk push logs. Mekanisme IAM mana yang AWS gunakan untuk memberikan permissions ini secara otomatis?
Correct answer: B
Explanation
Service-linked role adalah IAM role yang “di-create otomatis oleh AWS service” dan berisi “predefined permissions” yang diperlukan service itu untuk mengelola resource atas nama customer. Karena ECS perlu akses ke ECR untuk pull image dan CloudWatch untuk push logs, AWS memakai mekanisme ini agar permission diberikan otomatis dan terikat pada service tersebut.
Why each option is right or wrong
A. AWS Managed Policy yang di-attach ke account secara default
B. **Service-Linked Role** — IAM role yang di-create otomatis oleh AWS service dengan predefined permissions yang diperlukan service tersebut
IAM service-linked roles are defined in the IAM User Guide as roles that are created and managed by an AWS service and include the permissions that service needs to perform actions on your behalf. In this scenario, ECS needs to call ECR and CloudWatch without you manually attaching separate policies, so AWS uses the service-linked role mechanism rather than a customer-managed role; the role is tied to that service and its permissions are preconfigured by AWS for the service’s required API actions.
C. Instance profile yang di-attach ke setiap container
D. Root account credentials yang di-share ke AWS services