“If I record operations with CloudTrail, isn’t it safe to share the root user?”
“If I allow it in an Organizations SCP, won’t that team member be able to perform the operations?”
AWS Certified Cloud Practitioner (exam code CLF-C02, CLF below) often asks you to tell apart the mechanism that grants permissions (an IAM policy), the mechanism that sets an upper limit (an SCP), and the mechanisms that record activity (CloudTrail and AWS Config), and then choose the way of granting permissions that follows the principle of least privilege. Recording activity is not a substitute for narrowing permissions.
This article is Question 19 of a series that explains CLF practice questions one at a time. The author wrote the questions to match the scope of the exam; they are not actual exam questions. Choose your answer first, then read the explanation.
Question
At a company, a new member of the operations team only starts and stops Amazon EC2 instances. Under the AWS shared responsibility model, managing access permissions to AWS resources is the customer’s responsibility. Which of the following is the most appropriate way to grant permissions to this team member, following the principle of least privilege?
- A. Share the credentials of the AWS account root user with the team member, and record the operations with AWS CloudTrail
- B. Grant administrator permissions (AdministratorAccess) to the team member, and record configuration changes with AWS Config
- C. Use an AWS Identity and Access Management (IAM) policy that allows only the operations to start and stop EC2 instances, and attach it to the team member
- D. Use an AWS Organizations service control policy (SCP) to allow the team member to start and stop EC2 instances
Once you have chosen your answer, open the section below.
Show the answer (click to open)
Answer: C
Allowing only the needed operations in an IAM policy and granting it is the way that follows the principle of least privilege. The root user and administrator permissions are too broad, an SCP only sets an upper limit and does not grant permissions, and recording with CloudTrail or Config is not a substitute for narrowing permissions.
The answer is C
The correct answer is C.
- Allow only the needed operations in an IAM policy, and grant it to the team member
- This is the way of granting permissions that follows the principle of least privilege
The other three are either too broad or cannot grant permissions at all. Let’s look at the options one at a time.
Explanation of each option
A: Do not share the root user (incorrect)

The root user is a special user that can do everything in an AWS account. As the diagram shows, if you share its credentials, the team member can perform every operation. Only the two in the green frame, start and stop, are needed.
The principle is to not share the root user’s credentials and not use them for daily work. Even if you record operations with CloudTrail, you only find out afterward, and the permissions are still too broad.
B: Administrator permissions are too broad (incorrect)

AdministratorAccess is administrator permissions that allow every action. For a team member who only starts and stops instances, it is too broad and violates the principle of least privilege.
AWS Config is a service that records and evaluates changes to the configuration of resources. A record only tells you afterward; it cannot prevent unnecessary operations.
C: Allow only the needed operations in IAM (correct)

You use an IAM policy that allows only the operations to start and stop EC2 instances, and attach it to the team member. In IAM, if nothing is allowed, every operation is denied. Only the operations the policy allows are possible.
In the diagram, only start and stop are allowed, and the other operations are denied. This is least privilege.
Note that for human users, signing in through IAM Identity Center is the recommended approach. The permission sets you assign there are also IAM policies inside.
D: An SCP sets a limit and does not grant (incorrect)

An SCP in AWS Organizations does not grant permissions. It sets the upper limit of the permissions that can be used in an organization, an OU, or an account, and is also called a guardrail.
As the right of the diagram shows, what you can actually use is only the overlap of the SCP’s limit and what the IAM policy allows. Even if the SCP allows start and stop, the team member can do nothing unless an IAM policy allows it (the left of the diagram).
Granting, setting a limit, and recording
Here is a summary of the three mechanisms related to permissions, by role.
| Role | Mechanism | Description |
|---|---|---|
| Grant | IAM policy (including an Identity Center permission set) | Allow only the needed operations (= least privilege) |
| Set a limit | SCP (AWS Organizations) | The upper limit for an organization, OU, or account. An SCP alone cannot do anything |
| Record | CloudTrail, AWS Config | You only find out afterward. Not a substitute for narrowing permissions |
Key points
- Least privilege = allow only the needed operations in an IAM policy and grant it
- An SCP is an upper limit (guardrail). It does not grant permissions
- Records in CloudTrail and Config are not a substitute for narrowing permissions
- Do not share the root user, and do not use it for daily work
The course articles explain the principle of least privilege and IAM policies, and the relationship between SCPs and IAM, in detail.
- Lecture 10, Part 5: IAM and least privilege
- Lecture 9, Part 6: Organizations and SCPs
You can read all 14 lectures of AWS Cloud Practitioner Exam Prep in order from its series page.
The CLF-C02 Practice Questions series (100 questions)
All 100 questions with a reading guide: CLF-C02 Practice Questions
In this group (Questions 19–30: The shared responsibility model and security):
- Question 19: Principle of least privilege (IAM policies and SCPs) (this article)
- Question 20: Shared responsibility model (what AWS is responsible for with EC2 and S3)
- Question 21: Examples of shared controls (IT controls in the shared responsibility model)
- Question 22: Compliance reports and agreements (AWS Artifact)
- Question 23: Threat detection (Amazon GuardDuty)
- Question 24: Continuous vulnerability scanning (Amazon Inspector)
- Question 25: Discovering sensitive data in S3 (Amazon Macie)
- Question 26: Encryption at rest for S3 and managing the keys (SSE-KMS and client-side encryption)
- Question 27: Finding out who made a change (AWS CloudTrail)
- Question 28: A list of IAM users’ credentials (credential report)
- Question 29: Granting permissions to an application on EC2 (IAM roles)
- Question 30: Automatic rotation of database passwords (AWS Secrets Manager)
This series is the English edition of 【CLF-C02 試験対策問題】, originally written in Japanese.


コメント