
Ultimate access to all questions.
Deep dive into the quiz with AI chat providers.
We prepare a focused prompt with your quiz and certificate details so each AI can offer a more tailored, in-depth explanation.
A solutions architect has created two IAM policies: Policy1 and Policy2. Both policies are attached to an IAM group.
Policy 1
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iam:Get*",
"iam:List*",
"kms:List*",
"ec2:*",
"ds:*",
"logs:Get*",
"logs:Describe*"
],
"Resource": "*"
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iam:Get*",
"iam:List*",
"kms:List*",
"ec2:*",
"ds:*",
"logs:Get*",
"logs:Describe*"
],
"Resource": "*"
}
]
}
Policy 2
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Action": "ds:Delete*",
"Resource": "*"
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Action": "ds:Delete*",
"Resource": "*"
}
]
}
A cloud engineer is added as an IAM user to the IAM group. Which action will the cloud engineer be able to perform?
A
Deleting IAM users
B
Deleting directories
C
Deleting Amazon EC2 instances
D
Deleting logs from Amazon CloudWatch Logs
Explanation:
In AWS IAM, when multiple policies are attached to a principal (user, group, or role), the effective permissions are determined by evaluating all statements:
Policy 1 grants broad permissions:
iam:Get* and iam:List* - Allows GET and LIST operations on IAM resourcesec2:* - Allows ALL EC2 operations (including delete)ds:* - Allows ALL Directory Service operations (including delete)logs:Get* and logs:Describe* - Allows GET and DESCRIBE operations on CloudWatch LogsPolicy 2 explicitly denies ds:Delete* operations on Directory Service.
AWS IAM evaluation logic:
Analyzing each option:
A. Deleting IAM users - ❌ NOT allowed
iam:Get* and iam:List* operationsiam:Delete* operations are NOT includedB. Deleting directories - ❌ NOT allowed
ds:* which would include ds:Delete*ds:Delete*C. Deleting Amazon EC2 instances - ✅ ALLOWED
ec2:* which includes ALL EC2 operationsD. Deleting logs from Amazon CloudWatch Logs - ❌ NOT allowed
logs:Get* and logs:Describe*logs:Delete* operations are NOT includedKey IAM concepts demonstrated:
*) grant all operations for that service