Bird
0
0

Which of the following is the correct JSON syntax to explicitly deny the ec2:TerminateInstances action on all resources?

easy📝 Syntax Q3 of 15
AWS - Identity and Access Management
Which of the following is the correct JSON syntax to explicitly deny the ec2:TerminateInstances action on all resources?
A{"Effect": "Deny", "Action": "ec2:TerminateInstances", "Resource": "*"}
B{"Effect": "Allow", "Action": "ec2:TerminateInstances", "Resource": "*"}
C{"Effect": "Deny", "Action": ["ec2:TerminateInstances"]}
D{"Action": "ec2:TerminateInstances", "Resource": "*"}
Step-by-Step Solution
Solution:
  1. Step 1: Check Effect and Action fields

    Effect must be "Deny" and Action must specify "ec2:TerminateInstances".
  2. Step 2: Validate Resource field

    Resource "*" means all resources, which is correct here.
  3. Final Answer:

    Correct syntax with Effect Deny, Action string, and Resource * -> Option A
  4. Quick Check:

    Correct Deny syntax = {"Effect": "Deny", "Action": "ec2:TerminateInstances", "Resource": "*"} [OK]
Quick Trick: Effect Deny + Action + Resource * is correct deny syntax [OK]
Common Mistakes:
  • Using Allow instead of Deny
  • Omitting Resource field
  • Using array for single action incorrectly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes