107k views
3 votes
What does this IAM policy do?

{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Mystery Policy",
"Action": [
"ec2:RunInstances"
],
"Effect": "Allow",
"Resource": "*",
"Condition": {
"IpAddress": {
"aws:SourceIp": " "
}
}
}
]
}
a) Allows running instances for any source IP address
b) Allows running instances only for a specific source IP address
c) Denies running instances for any source IP address
d) Denies running instances only for a specific source IP address

1 Answer

4 votes

Final answer:

The IAM policy allows running instances for any source IP address.

Step-by-step explanation:

The IAM policy provided allows running instances for any source IP address. The policy grants permissions for the ec2:RunInstances action, which allows the user to launch EC2 instances. The Effect field is set to Allow, indicating that the action is permitted. The Resource field is set to *, meaning it applies to all resources. Finally, the Condition field specifies that there is no condition for the IpAddress and aws:SourceIp. Therefore, this policy allows running instances for any source IP address.

User Webbiedave
by
9.1k points