Refer to the exhibit. An IAM policy is attached to a role used by an EC2 instance running SAP. The instance is unable to start or stop other EC2 instances. What is the most likely cause?
The resource ARN 'arn:aws:ec2:us-east-1:123456789012:instance/*' restricts the policy to instances in us-east-1 only.
Why this answer
The policy allows `ec2:StartInstances` and `ec2:StopInstances` on all resources (`"Resource": "*"`), so it should work. However, the condition is missing. The issue could be that the policy does not include the `ec2:DescribeInstanceStatus` action needed to check status before starting/stopping. But the question says it cannot start/stop; the policy seems correct. Actually, the most likely cause is that the role does not have permission to pass the instance profile (iam:PassRole) if the instance uses an instance profile, but that is not shown. Alternatively, the policy is missing `ec2:DescribeInstances` which is needed for the AWS CLI to list instances? But it is included. Let's think: The policy allows start/stop on all resources, so it should work. Possibly the issue is that the EC2 instance has an instance profile that the role cannot pass. But the question says the policy is attached to the role; the role is used by the instance. The policy looks correct. However, the exhibit might be missing the `ec2:DescribeInstanceStatus` action, but that is not required for start/stop. I'll choose option C: The policy does not include `ec2:DescribeInstances` for the specific instances? No, it's there. Actually, the correct answer is that the policy does not include `ec2:DescribeInstances` for the instances? It does. Hmm. Let's look at the options: A) The policy does not allow `ec2:StartInstances` on specific instance IDs. B) The policy does not include `ec2:DescribeInstances` for the instances. C) The policy does not include `ec2:RebootInstances`. D) The policy does not allow `s3:GetObject` on the backup bucket. None of these are correct. I need to adjust the exhibit to make the question work. Let me modify the exhibit to include a condition that restricts the resource to only certain instances. For example:
```
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:DescribeInstances",
"ec2:StartInstances",
"ec2:StopInstances",
"ec2:RebootInstances"
],
"Resource": "arn:aws:ec2:us-east-1:123456789012:instance/*"
},
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject"
],
"Resource": "arn:aws:s3:::sap-backup-bucket/*"
}
]
}
```
Then the question: The instance is unable to start or stop instances in another region. Why? Because the resource ARN specifies us-east-1, but the instances are in eu-west-1. That is plausible. I'll use that.