Hard1 markMultiple Choice
Domain 1.2: Security ControlsOrganizationsSCPSecurity

AWS SAP-C02 · Question 69 · Domain 1.2: Security Controls

A company is using AWS Organizations. They want to apply a Service Control Policy (SCP) to an Organizational Unit (OU) to prevent any user from deleting VPC Flow Logs. However, they want the 'NetworkAdmin' IAM role to be exempt from this restriction. How can this be achieved?

Answer options:

A.

Create an SCP with an Allow effect for the NetworkAdmin role.

B.

Create an SCP with a Deny effect for the 'ec2:DeleteFlowLogs' action, and add a condition using 'StringNotLike' with the 'aws:PrincipalARN' key pointing to the NetworkAdmin role.

C.

Attach an IAM policy to the NetworkAdmin role that explicitly allows deleting flow logs.

D.

Move the NetworkAdmin role to a different AWS account outside the OU.

How to approach this question

Use SCP conditions to create exceptions.

Full Answer

B.Create an SCP with a Deny effect for the 'ec2:DeleteFlowLogs' action, and add a condition using 'StringNotLike' with the 'aws:PrincipalARN' key pointing to the NetworkAdmin role.✓ Correct
Create an SCP with a Deny effect for the 'ec2:DeleteFlowLogs' action, and add a condition using 'StringNotLike' with the 'aws:PrincipalARN' key pointing to the NetworkAdmin role.
To create an exception in an SCP, you use a Deny statement combined with a condition. The 'StringNotLike' or 'ArnNotEquals' condition on 'aws:PrincipalARN' ensures the Deny applies to everyone except the specified role.

Common mistakes

Thinking an IAM Allow can override an SCP Deny.

Practice the full AWS Solutions Architect Professional SAP-C02 Practice Exam 2

75 questions · hints · full answers · grading

More questions from this exam