An IAM policy is attached to a user who manages SAP HANA volumes. The policy is shown in the exhibit. What is the effect of this policy?
Correct: The first statement allows AttachVolume and DetachVolume only when the volume has the tag Environment=production. The second statement denies DeleteVolume for all volumes. Thus, the user can attach/detach volumes with that tag but cannot delete any volume.
Why this answer
The first statement allows ec2:AttachVolume and ec2:DetachVolume only if the volume has tag Environment=production. The second statement denies ec2:DeleteVolume for all volumes. Therefore, the user can attach and detach volumes that have the tag Environment=production, but cannot delete any volume.
Option A is incorrect because attach/detach are allowed only with the condition. Option B is incorrect because delete is denied for all volumes. Option D is incorrect because the allow statement is conditional on the specific tag value, not just the production environment.