
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.
An Amazon EC2 administrator created the following policy associated with an IAM group containing several users:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "ec2:TerminateInstances",
"Resource": "*",
"Condition": {
"IpAddress": {
"aws:SourceIp": "10.100.100.0/24"
}
}
},
{
"Effect": "Deny",
"Action": "ec2:*",
"Resource": "*",
"Condition": {
"StringNotEquals": {
"ec2:Region": "us-east-1"
}
}
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "ec2:TerminateInstances",
"Resource": "*",
"Condition": {
"IpAddress": {
"aws:SourceIp": "10.100.100.0/24"
}
}
},
{
"Effect": "Deny",
"Action": "ec2:*",
"Resource": "*",
"Condition": {
"StringNotEquals": {
"ec2:Region": "us-east-1"
}
}
}
]
}
What is the effect of this policy?
A
Users can terminate an EC2 instance in any AWS Region except us-east-1.
B
Users can terminate an EC2 instance with the IP address 10.100.100.1 in the us-east-1 Region.
C
Users can terminate an EC2 instance in the us-east-1 Region when the user's source IP is 10.100.100.254.
D
Users cannot terminate an EC2 instance in the us-east-1 Region when the user's source IP is 10.100.100.254.
Explanation:
This IAM policy has two statements that work together:
First Statement (Allow):
ec2:TerminateInstances action* (all EC2 instances)10.100.100.0/24Second Statement (Deny):
ec2:*)* (all EC2 instances)us-east-1us-east-110.100.100.0/2410.100.100.254 is within the 10.100.100.0/24 subnet (range: 10.100.100.0 - 10.100.100.255)In this case: