SaveMyCert
Log in
5 of 5 free questions left today·for 30 a day
SOA-C03 · Domain 4

Security and Compliance practice questions

Security and Compliance is worth 16% of the SOA-C03 exam — the lightest of the 5 domains. IAM policy management and access auditing, multi-account security strategies, and protecting data and infrastructure. 6 fully worked examples are further down this page, answers included.

Exam weight
16%
the lightest of the 5 domains
Questions
40
across 2 topics
Free, no account
5/day
sign up free to remove the cap
Explanations
Every option
right and wrong

Build a practice session

5 free questions left today.

Domains

How many?

Mode

Ready when you are

10 fresh questions drawn across 1 of 5 domains, in Learn mode.

Focused review

Every question you answer incorrectly, and every question you flag while practising, is saved here automatically. Finish a session and you can come back to re-drill just those.

6 sample Security and Compliance questions, fully explained

Questions from the SOA-C03 bank mapped to domain 4, with the answer key and the reasoning behind every option. None of them repeat the examples on the main SOA-C03 practice page.

Question 1Security and Compliance

During a credential review, a CloudOps engineer finds that an application running on an EC2 instance reads an IAM user's access keys from a configuration file to call Amazon S3. What is the MOST secure way to eliminate the long-term credentials?

Choose one.

  • a
    Rotate the access keys every 90 days and keep them in the configuration file.

    Rotation shortens the exposure window but the credentials remain long-term secrets sitting in an artifact — the risk the review flagged is still present.

  • b
    Encrypt the configuration file with AWS KMS so the keys are not stored in plaintext.

    The application must still decrypt and use the same long-term keys at runtime, so nothing about the credential model changes — the keys still exist and can still leak.

  • c
    Attach an IAM role to the instance through an instance profile and delete the IAM user's access keys. Correct

    An instance profile delivers short-lived, automatically rotated role credentials to the application, so there are no long-term keys left to leak or rotate.

  • d
    Move the access keys into the instance's user data script.

    User data is readable through the instance metadata service and the console, so this makes the exposure worse while keeping the long-term keys.

The concept

Workloads should obtain AWS credentials from IAM roles — for EC2, via an instance profile — instead of long-term access keys stored in files, AMIs, or user data.

Why that’s the answer

An instance profile role gives the application short-lived credentials that AWS rotates automatically, removing the long-term keys entirely. Rotating keys or encrypting the file still leaves durable secrets in an artifact, and user data is even more exposed because it is readable via instance metadata — on this exam, any option that keeps access keys on an instance loses to a role.

How to reason it out
  1. Create an IAM role with the S3 permissions the application needs.
  2. Attach the role to the EC2 instance as an instance profile.
  3. Update the application to use the default credential chain instead of the configuration file.
  4. Verify the application works, then deactivate and delete the IAM user's access keys.

Exam tip: Replace access keys on EC2 with an instance profile role — short-lived credentials beat any scheme for protecting long-term keys.

IAM, AWS Organizations, and Compliance Tools for CloudOps (SOA-C03) — the lesson that teaches this.

Question 2Security and Compliance

An IAM role in account A must upload objects directly to an S3 bucket owned by account B, keeping its own identity rather than assuming a role in account B. The role's identity-based policy allows s3:PutObject on the bucket's objects, but every upload fails with AccessDenied. What is the MOST likely cause?

Choose one.

  • a
    Cross-account S3 access always requires assuming a role in the bucket owner's account.

    A resource-based bucket policy can grant a foreign principal direct access while it keeps its own identity — role assumption is one option, not a requirement.

  • b
    The role in account A also needs sts:AssumeRole permission for account B.

    No role in account B is being assumed in this design, so sts:AssumeRole is irrelevant to the failure.

  • c
    Amazon S3 requires both accounts to belong to the same AWS Organization.

    Organization membership is not required for cross-account S3 access; aws:PrincipalOrgID is an optional condition, not a prerequisite.

  • d
    The bucket policy in account B does not include the account A role as an allowed principal. Correct

    Cross-account access requires an allow on both sides: the caller's identity policy in account A and a resource-based bucket policy in account B naming the caller. The missing bucket-policy allow explains the denial.

The concept

Within one account an allow from either an identity-based or a resource-based policy is enough; across accounts, both sides must allow — the caller's identity policy and the target resource's policy.

Why that’s the answer

The identity side is already satisfied, so the missing piece is the bucket policy in account B naming the account A role (or its account) as a principal. Role assumption is an alternative pattern, not a requirement, so options invoking sts:AssumeRole are wrong, and there is no organization-membership prerequisite for cross-account S3 access.

How to reason it out
  1. Confirm the account A role's identity policy allows s3:PutObject on arn:aws:s3:::bucket/*.
  2. Add a bucket policy statement in account B allowing s3:PutObject for the account A role's ARN.
  3. Check for explicit denies in the bucket policy that could still override the allow.
  4. Retry the upload and confirm success in CloudTrail.

Exam tip: Cross-account access needs an allow on both sides — the caller's identity policy and the resource-based policy on the target.

IAM, AWS Organizations, and Compliance Tools for CloudOps (SOA-C03) — the lesson that teaches this.

Question 3Security and Compliance

A company stores shared deployment artifacts in an S3 bucket that must be readable by every AWS account in its organization — including accounts created in the future — and by no one else. Which bucket policy approach meets the requirement with the LEAST ongoing maintenance?

Choose one.

  • a
    Allow s3:GetObject with a condition that aws:PrincipalOrgID matches the organization's ID. Correct

    aws:PrincipalOrgID admits any principal whose account belongs to the organization, so new accounts are covered automatically and outside principals are excluded — no policy edits ever needed.

  • b
    List every current member account ID as a principal and update the policy whenever an account is added.

    This works today but requires a policy change for every new account — exactly the ongoing maintenance the requirement rules out.

  • c
    Make the bucket public and rely on SCPs to keep outsiders from reading it.

    SCPs only constrain principals inside your own organization; a public bucket is readable by the entire internet, which SCPs cannot prevent.

  • d
    Allow s3:GetObject with an aws:SourceIp condition matching the corporate network CIDR.

    An IP condition tests network location, not organization membership — it would block legitimate access from AWS-hosted workloads and admit anyone on the corporate network regardless of account.

The concept

The aws:PrincipalOrgID condition key, used in resource-based policies, grants access to every principal in an AWS Organizations organization without listing account IDs.

Why that’s the answer

A single condition on the organization ID automatically covers future accounts and excludes external principals. Enumerating account IDs creates permanent maintenance, a public bucket cannot be protected by SCPs (they only apply to your own org's principals), and aws:SourceIp tests where a call comes from rather than who is calling.

How to reason it out
  1. Find the organization ID in the AWS Organizations console.
  2. Write a bucket policy allowing s3:GetObject for Principal "*" with the condition aws:PrincipalOrgID equals the organization ID.
  3. Keep S3 Block Public Access enabled — the condition means the policy is not public.
  4. Test access from a member account and from an external account to confirm the boundary.

Exam tip: Use aws:PrincipalOrgID in a resource policy to grant org-only access that automatically covers new accounts.

IAM, AWS Organizations, and Compliance Tools for CloudOps (SOA-C03) — the lesson that teaches this.

Question 4Security and Compliance

A compliance policy states that IAM users may call AWS APIs only when connecting from the corporate office network. Which IAM policy condition key should a CloudOps engineer use to enforce this restriction?

Choose one.

  • a
    aws:SourceIp Correct

    aws:SourceIp evaluates the caller's public IP address against a CIDR range — the standard way to require calls to originate from the corporate network.

  • b
    aws:RequestedRegion

    aws:RequestedRegion controls which AWS Region an API call targets, not the network the caller connects from.

  • c
    aws:PrincipalOrgID

    aws:PrincipalOrgID tests which AWS Organization the calling principal's account belongs to — it says nothing about network location.

  • d
    aws:MultiFactorAuthPresent

    aws:MultiFactorAuthPresent tests whether the request was authenticated with MFA, not where it came from.

The concept

IAM condition keys scope when a policy statement applies; aws:SourceIp restricts requests to a set of source IP CIDR ranges.

Why that’s the answer

Only aws:SourceIp evaluates the caller's IP address, so a Deny when aws:SourceIp is outside the corporate CIDR enforces the office-network rule. The distractors test other request attributes: target Region (aws:RequestedRegion), organization membership (aws:PrincipalOrgID), and MFA context (aws:MultiFactorAuthPresent).

How to reason it out
  1. Identify the corporate network's public CIDR ranges.
  2. Write a Deny statement on the relevant actions with the condition NotIpAddress aws:SourceIp matching those ranges.
  3. Attach the policy to the IAM users or their group.
  4. Test from inside and outside the corporate network to confirm the boundary, noting that requests through a VPC endpoint will not match a public-IP condition.

Exam tip: aws:SourceIp is the condition key for restricting API calls to specific source networks.

IAM, AWS Organizations, and Compliance Tools for CloudOps (SOA-C03) — the lesson that teaches this.

Question 5Security and Compliance

A platform team wants application developers to create their own IAM roles for their workloads, but must guarantee that no developer-created role can ever hold permissions beyond an approved maximum — even if a developer attaches AdministratorAccess to it. Which solution provides this guarantee?

Choose one.

  • a
    Attach the approved maximum permission set directly to each developer's IAM user.

    This caps what the developers themselves can do, but places no limit on the permissions of the roles they create for workloads.

  • b
    Review every new role with the IAM policy simulator before it is used.

    Simulation is a manual, detective check — it neither prevents an over-permissive role from being created nor guarantees the review happens.

  • c
    Require every developer-created role to carry an approved permissions boundary, enforced with a condition on the developers' iam:CreateRole permission. Correct

    A permissions boundary caps a role's effective permissions at the intersection with the boundary, and conditioning iam:CreateRole on that boundary makes it impossible to create a role without the cap.

  • d
    Enable IAM Access Analyzer so it blocks the creation of over-permissive roles.

    Access Analyzer produces findings about access; it never blocks role creation or caps a role's permissions.

The concept

Permissions boundaries cap the maximum permissions of an individual IAM user or role — the effective permission is the intersection of the identity policy and the boundary, and the boundary itself grants nothing.

Why that’s the answer

The standard delegation pattern is to let a team create roles while requiring — via a condition on iam:CreateRole — that every role carries an approved boundary, so even AdministratorAccess attached to the role is capped. Limiting the developers' own permissions does not constrain the roles they mint, and the policy simulator and Access Analyzer are assessment tools that cannot prevent anything.

How to reason it out
  1. Author the boundary policy defining the approved maximum permissions.
  2. Grant developers iam:CreateRole and iam:AttachRolePolicy with a condition requiring the iam:PermissionsBoundary to equal the approved boundary's ARN.
  3. Deny iam:DeleteRolePermissionsBoundary so the cap cannot be removed.
  4. Test by creating a role with AdministratorAccess attached and confirming its effective permissions stay inside the boundary.

Exam tip: Delegate role creation safely by requiring a permissions boundary — the role's effective permissions can never exceed it.

IAM, AWS Organizations, and Compliance Tools for CloudOps (SOA-C03) — the lesson that teaches this.

Question 6Security and Compliance

An IAM user's identity-based policy allows s3:GetObject on every object in a bucket. The bucket policy contains an explicit Deny of s3:GetObject on the finance/ prefix for all principals. What happens when the user requests an object under finance/?

Choose one.

  • a
    The request is allowed, because identity-based policies take precedence over bucket policies.

    There is no precedence between the policy families; allows from either are combined, but a deny from anywhere wins.

  • b
    The request is allowed, because the user is in the same account as the bucket.

    Same-account access means an allow from either policy family suffices — but that logic applies to allows, and an explicit deny still ends evaluation.

  • c
    The request is denied only if the user's own identity policy also contains a deny.

    A single explicit deny anywhere in the evaluation is enough; it does not need to be repeated in the identity policy.

  • d
    The request is denied, because an explicit deny overrides any allow. Correct

    Policy evaluation ends the moment an explicit deny matches — no allow in any policy, identity-based or resource-based, can override it.

The concept

In IAM policy evaluation, an explicit deny in any applicable policy — identity-based, resource-based, SCP, or boundary — immediately ends evaluation and overrides every allow.

Why that’s the answer

The bucket policy's explicit Deny on the finance/ prefix matches the request, so it is denied despite the user's broad allow. There is no precedence order that favors identity policies, same-account convenience only applies to allows, and a deny never needs to appear in more than one place to take effect.

How to reason it out
  1. Check whether any applicable policy explicitly denies the action on the resource — if so, the request is denied.
  2. Only if no deny matches, check the gates: SCPs and any permissions boundary must allow the action.
  3. Finally, look for an allow in an identity-based or resource-based policy.
  4. Here, step 1 already resolves it: the bucket policy's explicit deny wins.

Exam tip: An explicit deny anywhere always wins — no allow in any policy can override it.

IAM, AWS Organizations, and Compliance Tools for CloudOps (SOA-C03) — the lesson that teaches this.

What SOA-C03 domain 4 tests, topic by topic

The official exam guide breaks Security and Compliance into 2 topics. The question bank follows the same split, so a weak topic shows up as a cluster of misses you can go back and read.

Published SOA-C03 practice questions per topic in Security and Compliance
TopicWhat it coversQuestions
Implement and manage security and compliance tools and policiesExam guide task 4.1. IAM features — password policies, MFA, roles, federated identity, resource policies, policy conditions; troubleshooting and auditing access with CloudTrail, IAM Access Analyzer, and the IAM policy simulator; secure multi-account strategies (AWS Organizations, service control policies, IAM Identity Center); remediating Trusted Advisor security checks; enforcing compliance requirements and continuous monitoring (Region and service selections, AWS Config conformance packs).20
Implement strategies to protect data and infrastructureExam guide task 4.2. Data classification schemes; encryption at rest (AWS KMS) and in transit (ACM); securely storing secrets with AWS services; configuring reports and remediating findings across Security Hub, GuardDuty, AWS Config, Inspector, and AWS Security Agent.20
Total40

Revise Security and Compliance before you drill it

Other SOA-C03 domains

Security and Compliance: your questions

Security and Compliance is domain 4 of the SOA-C03 exam guide and carries 16% of the scored content — the lightest of the 5 domains. On a 65-question paper that works out to roughly 10 questions, though AWS does not publish an exact per-domain count and individual exam forms vary.

Source

The domain weight and topic list on this page come from the official SOA-C03 exam guide.