A developer uses SSH keys to access AWS CodeCommit. The SSH keys are associated with a user who currently has a certain set of permissions. The developer needs to allow that user to create and delete branches. Which specific IAM permissions should be added to follow the principle of least privilege?
Choose an answer
Tap an option to check your answer.
Correct answer: "codecommit:CreateBranch" and "codecommit:DeleteBranch".
Why this is the answer
The correct answer is "codecommit:CreateBranch" and "codecommit:DeleteBranch" because these are the specific IAM actions that grant permission to create and delete branches in CodeCommit, adhering to the principle of least privilege. Granting only these actions ensures the user has precisely the necessary permissions without over-privileging them. "codecommit:Put" and "codecommit:Update" are too broad. "Put" actions typically relate to uploading or adding content, while "Update" actions modify existing resources. Neither specifically covers branch creation or deletion. "codecommit:" is incorrect because it grants all CodeCommit permissions, violating the principle of least privilege by giving far more access than required.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed