The answer is that the termination is denied. This occurs because the IAM policy condition key evaluation checks the `aws:ResourceTag/Environment` condition against the EC2 instance's tags, and since the condition requires the value `production` but the instance is tagged `staging`, the condition fails and the `TerminateInstances` action is implicitly denied. On the AWS Certified Solutions Architect Professional SAP-C02 exam, this scenario tests your understanding of how IAM condition keys enforce resource-level controls, often appearing in questions that combine tag-based policies with specific API actions. A common trap is assuming that a missing or mismatched tag results in an allowed action by default, but remember that when a condition key is present in a policy, it must be satisfied for the action to be permitted. Memory tip: think of condition keys as bouncers—if the tag on the door doesn’t match the guest list, entry is denied.
SAP-C02 Practice Question: Accelerate Workload Migration and Modernization
This SAP-C02 practice question tests your understanding of accelerate workload migration and modernization. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
Refer to the exhibit. A company has this IAM policy attached to a group. A user in the group tries to terminate an EC2 instance in us-east-1 with the tag 'Environment: staging'. What happens?
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The termination is denied because the condition requires the 'Environment' tag to be 'production'.
The TerminateInstances action has a condition that requires the tag 'Environment: production'. Since the instance has 'staging', the condition is not met, so the action is denied. Options A, B, and D are incorrect because the condition explicitly requires 'production'.
Key principle: NAT direction and interface roles matter as much as the IP address mapping. Inside/outside designation controls which traffic is translated.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
✗
The instance is terminated because the policy allows TerminateInstances.
Why it's wrong here
The policy has a condition that restricts to production instances.
✓
The termination is denied because the condition requires the 'Environment' tag to be 'production'.
Why this is correct
The condition StringEquals requires the tag value to be 'production'.
Related concept
Static NAT maps one inside address to one outside address.
✗
The termination is denied because the Resource is not the instance's ARN.
Why it's wrong here
The Resource is a wildcard for all instances, so ARN matches.
✗
The instance is terminated because the condition is not evaluated.
Why it's wrong here
Conditions are evaluated and must be met.
Common exam traps
Common exam trap: NAT rules depend on direction and matching traffic
NAT is not only about the public address. The inside/outside interface roles and the ACL or rule that matches traffic are just as important.
Detailed technical explanation
How to think about this question
NAT questions usually test address translation, overload/PAT behaviour, static mappings and whether the right traffic is being translated. Read the interface direction and address terms carefully.
KKey Concepts to Remember
Static NAT maps one inside address to one outside address.
PAT allows many inside hosts to share one public address using ports.
Inside local and inside global describe the private and translated addresses.
NAT ACLs identify traffic for translation, not always security filtering.
TExam Day Tips
→Identify inside and outside interfaces first.
→Check whether the scenario needs static NAT, dynamic NAT or PAT.
→Do not confuse NAT matching ACLs with normal packet-filtering intent.
Key takeaway
NAT direction and interface roles matter as much as the IP address mapping. Inside/outside designation controls which traffic is translated.
Real-world example
How this comes up in practice
A company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.
What to study next
Got this wrong? Here's your next step.
Review the four NAT address types (inside local, inside global, outside local, outside global), PAT port overload, and static vs dynamic NAT use cases. Then practise related SAP-C02 NAT questions on configuration and troubleshooting.
Accelerate Workload Migration and Modernization — This question tests Accelerate Workload Migration and Modernization — Static NAT maps one inside address to one outside address..
What is the correct answer to this question?
The correct answer is: The termination is denied because the condition requires the 'Environment' tag to be 'production'. — The TerminateInstances action has a condition that requires the tag 'Environment: production'. Since the instance has 'staging', the condition is not met, so the action is denied. Options A, B, and D are incorrect because the condition explicitly requires 'production'.
What should I do if I get this SAP-C02 question wrong?
Review the four NAT address types (inside local, inside global, outside local, outside global), PAT port overload, and static vs dynamic NAT use cases. Then practise related SAP-C02 NAT questions on configuration and troubleshooting.
What is the key concept behind this question?
Static NAT maps one inside address to one outside address.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. Refer to the exhibit. An IAM policy is attached to an IAM user. The user tries to upload an object to `s3://my-bucket/secret/data.txt` from an IP address in the 10.0.0.0/8 range. What will happen?
hard
A.The upload succeeds because the Allow statement grants s3:PutObject.
B.The upload succeeds because the Deny statement only applies to GetObject, not PutObject.
C.The upload fails because the Deny statement denies all s3 actions unconditionally.
✓ D.The upload fails because the Deny statement explicitly denies s3:PutObject for the prefix secret/ from the specified IP range.
Why D: Option B is correct. The Deny statement explicitly denies s3:PutObject (part of s3:*) for the prefix secret/ when the source IP is in 10.0.0.0/8. Since the condition matches, the Deny overrides the Allow. Option A is wrong because the Deny applies. Option C is wrong because the Deny is conditional, not unconditional. Option D is wrong because there is no explicit Deny for other IPs, but the condition applies to the user's IP.
Variation 2. A company attaches the IAM policy shown in the exhibit to an IAM user. The user tries to upload an object to my-bucket using the AWS CLI without the --ssl flag (i.e., using HTTP). What will happen?
hard
A.The upload fails with an implicit denial because the Allow condition is not met.
B.The upload succeeds because the Allow statement grants s3:PutObject.
✓ C.The upload fails with an explicit deny because of the Deny statement.
D.The upload succeeds because there is no explicit Deny for s3:PutObject.
Why C: Option C is correct because the Deny statement with aws:SecureTransport=false explicitly denies non-HTTPS requests. Option A is wrong because the Allow statement requires HTTPS. Option B is wrong because the Deny is explicit. Option D is wrong because the Deny is explicit.
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
This SAP-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SAP-C02 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.