An enterprise manages its multi-account cloud environment using AWS Organizations. The security team mandates that no IAM users or roles within the 'Workloads' Organizational Unit (OU) should be able to delete Amazon S3 buckets, with the sole exception of a specific break-glass IAM role named 'EmergencyAdmin' that exists in all member accounts. The security team wants to enforce this governance control centrally with the least operational overhead. Which solution should a Solutions Architect recommend?
- AApply a Service Control Policy (SCP) to the Workloads OU that denies the `s3:DeleteBucket` action. In each member account, attach an IAM policy to all roles except `EmergencyAdmin` that explicitly denies the `s3:DeleteBucket` action.
- Apply a Service Control Policy (SCP) to the Workloads OU that denies the `s3:DeleteBucket` action. Include a condition in the SCP using `StringNotLike` for `aws:PrincipalARN` that excludes the `EmergencyAdmin` role ARN path `arn:aws:iam::*:role/EmergencyAdmin`.Cevap
- CApply a Service Control Policy (SCP) to the Workloads OU that denies the `s3:DeleteBucket` action. Use the `NotPrincipal` element within the SCP statement to exclude the `EmergencyAdmin` role from the deny effect.
- DCreate a new OU named 'Diagnostics' for accounts that require emergency access. Apply the S3 deletion restriction SCP only to the Workloads OU, and manage S3 deletion permissions via local IAM policies within the Diagnostics OU.
Cevap
Apply a Service Control Policy (SCP) to the Workloads OU that denies the `s3:DeleteBucket` action, using a condition with `StringNotLike` for `aws:PrincipalARN` to exclude the `EmergencyAdmin` role path.
The correct answer utilizes a Service Control Policy (SCP) applied to the target OU. By using an explicit Deny with a condition checking that the request's `aws:PrincipalARN` does not match the emergency role path, the policy allows the emergency role to bypass the restriction while denying S3 bucket deletion to all other users and roles centrally.
Adım Adım Çözüm
Anahtar Kavram
AWS Organizations Service Control Policies (SCPs) act as guardrails. While they do not support the `NotPrincipal` element, they can implement exceptions using conditions matching the `aws:PrincipalARN` context key.
Tahmini Süre:2m 0s