
Explanation:
Explanation: The Condition block uses aws:RequestedRegion with StringEquals, restricting RunInstances to only the two listed regions.
Ultimate access to all questions.
A developer has the following policy attached. Which AWS regions can they launch EC2 instances in?
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "ec2:RunInstances",
"Resource": "*",
"Condition": {
"StringEquals": {
"aws:RequestedRegion": ["ap-south-1", "ap-southeast-1"]
}
}
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "ec2:RunInstances",
"Resource": "*",
"Condition": {
"StringEquals": {
"aws:RequestedRegion": ["ap-south-1", "ap-southeast-1"]
}
}
}
]
}
A
All AWS regions
B
Only ap-south-1
C
Only ap-south-1 and ap-southeast-1
D
No regions — RunInstances is not a valid action
No comments yet.