Question 10
A subnet contains several EC2 workloads with different security groups. The network team must explicitly deny new inbound traffic from a known malicious CIDR at the subnet boundary, even if an instance security group has a broad allow rule. Which control directly provides this explicit CIDR deny?
- Add a lower-numbered deny rule to each security group.
- Remove the VPC local route to the subnet.
- Attach a permissions boundary to the EC2 instance role.
- Add an inbound deny rule to the subnet network ACL with priority over any matching allow.
Explanation
Correct Answer
D:An ACL supports ordered allow and deny rules evaluated at the subnet boundary. A matching deny with a lower rule number than a broad allow blocks the specified source range even if a security group would allow it. Rule ordering and the ACL association must both match the affected subnet.
Incorrect Answers
A:Security groups contain allow rules and combine their allowed traffic; they do not support ordered explicit deny entries. A security-group deny rule therefore cannot implement the requested exception.
B:The local route enables communication within the VPC and is not a source-CIDR deny list. Changing routing to the subnet is broader than the requested malicious-source filter and can disrupt legitimate connectivity.
C:A permissions boundary constrains IAM permissions available through identity policies. It does not inspect inbound packets or override network rules at a subnet boundary.
Question 11
A role in account A needs to assume a role in account B. Account B already trusts the account A role, but the source role has no sts:AssumeRole permission. There are no explicit denies or other limiting policies. What additional permission is required?
- Allow sts:AssumeRole only in the destination role permissions policy.
- Allow sts:AssumeRole on the destination role ARN in the source role identity policy.
- Allow s3:GetObject on the destination account root ARN.
- Grant the source role permission to edit its own trust policy.
Explanation
Correct Answer
B:Cross-account role assumption requires permission on the requesting side as well as trust on the receiving side. The source role should allow the STS action against the specific target role ARN. After STS issues credentials, the target role permissions determine the session resource access.
Incorrect Answers
A:The destination role permissions policy governs what the assumed session can do after assumption. It does not authorize the source principal to request that session across accounts.
C:S3 object retrieval is a different API action and resource authorization problem. It cannot authorize an STS request, and an account root ARN is not an S3 object resource.
D:Editing trust changes who can assume the source role. The failing request concerns the source role assuming a different role, so self-management of its trust is neither required nor the least-privilege fix.
Question 12
An IAM role has an identity policy allowing s3:GetObject and s3:PutObject on a bucket prefix. Its permissions boundary allows only s3:GetObject on that prefix. No resource-based policy grants access, and no other restrictions apply. Which outcome is expected?
- Both operations succeed because the identity policy contains explicit allows.
- Neither operation succeeds because boundaries cannot contain allow statements.
- GetObject is allowed, but PutObject is not allowed.
- PutObject is allowed because write operations take priority over read operations.
Explanation
Correct Answer
C:The effective identity-based permissions are the intersection of the two policies. Reading is present in both, whereas writing is outside the boundary. The stem excludes resource-policy grants to avoid confusing this calculation with the different rules for direct resource-based permissions.
Incorrect Answers
A:The identity policy does not override the boundary. With the stated identity-policy-only permission path, an action must be allowed by both layers.
B:Boundaries are managed policies that can allow a maximum set of actions. They do not grant access by themselves, but an action included in both the boundary and the identity policy can be authorized.
D:IAM does not assign write actions precedence over read actions. Each requested API operation is evaluated against the applicable statements and policy constraints.
Question 13
A monitoring provider uses one AWS account to assume customer roles. Another customer knows your role ARN and might ask the provider to use it. Which trust-policy design helps prevent the provider from confusing that customer with your organization?
- Trust the provider principal and require the unique external ID the provider assigned to your customer relationship.
- Trust any principal that knows the role ARN.
- Require a role-session name equal to your company display name and remove the provider restriction.
- Give the provider an IAM user access key instead of a role.
Explanation
Correct Answer
A:The provider supplies the customer-specific external ID when requesting the role session, and the trust condition verifies that value. This binds the provider action to the intended customer relationship and addresses the confused-deputy risk. The external ID supplements the trusted principal restriction; it is not a replacement for identifying the provider.
Incorrect Answers
B:An ARN identifies a resource and is not an authentication secret. Removing the provider restriction expands trust instead of ensuring that a provider request belongs to the correct customer.
C:A session name is useful for attribution but a display name does not establish the intended customer relationship. Dropping the provider principal restriction also broadens the set of entities that might request access.
D:Long-term user credentials introduce credential distribution and rotation duties. Merely changing the credential type does not bind provider requests to the correct customer, which is the failure described.
Question 14
A compromised application has an active STS session for an IAM role. The responder has already blocked further role assumption, but must also deny requests from role sessions issued before the containment timestamp. Which mechanism addresses the existing sessions?
- Reduce the role maximum session duration and assume all existing credentials expire immediately.
- Remove only the role's trust-policy allow statements.
- Delete the application copy of the role ARN.
- Apply the role-session revocation mechanism that denies sessions with aws:TokenIssueTime earlier than the cutoff.
Explanation
Correct Answer
D:Role-session revocation adds a policy condition that denies requests made using credentials issued before the specified time. This controls the permissions of existing sessions rather than merely preventing new assumptions. The responder should allow for policy propagation and verify the intended denial in the affected environment.
Incorrect Answers
A:The maximum duration limits the duration requested for subsequent sessions. Lowering it does not retroactively shorten every already-issued credential lifetime to the new value.
B:Trust changes prevent future assumptions but do not by themselves revoke permissions from credentials that STS already issued before containment.
C:The role ARN is an identifier rather than the issued access key, secret key, and session token. Removing a local copy does not prevent someone who already holds session credentials from using them.
Question 15
A records archive must prevent deletion or shortening of retention for a protected S3 object version during its seven-year retention period, including attempts by the account root user. Which S3 configuration meets this requirement?
- S3 Versioning without Object Lock.
- S3 Object Lock in compliance mode with the required retain-until date.
- S3 Object Lock in governance mode with bypass permission assigned to archive administrators.
- An S3 Lifecycle rule that expires objects after seven years.
Explanation
Correct Answer
B:Compliance retention prevents a protected version from being overwritten or deleted during retention, including by root. Its retention mode cannot be changed and the period cannot be shortened. Protection applies to that version; uploading a new version does not remove the retained one.
Incorrect Answers
A:Versioning preserves multiple versions but does not prevent authorized permanent deletion of a version. It therefore lacks the required retention protection against highly privileged deletion.
C:Governance retention can be bypassed by a principal with the required permission and bypass request. Explicitly assigning that capability conflicts with the requirement that privileged users cannot defeat retention.
D:A lifecycle expiration schedule governs when objects become eligible for automated expiration. It does not impose an immutable minimum retention period against a principal authorized to delete versions.
Question 16
An S3 object in account A uses SSE-KMS with a customer managed key in account A. A role in account B has working cross-account S3 read access but no KMS permissions. No other access restrictions apply. Which TWO permissions changes are required for that role to decrypt the object? Choose TWO.
- Grant only s3:ListBucket to the external role.
- Add kms:Decrypt to the S3 bucket policy as an S3 action.
- Allow the external role to use kms:Decrypt in the KMS key policy.
- Allow kms:Decrypt on the key ARN in the account B role identity policy.
- Grant kms:ScheduleKeyDeletion to the external role.
Explanation
Correct Answers
C:The key owner must permit cross-account cryptographic use through the customer managed key policy. Scoping that permission to the external role and required operation avoids granting unnecessary key administration. This permission is paired with authorization in the caller account.
D:The requesting role also needs an identity-based allow for the cross-account KMS operation. Using the full key ARN scopes the grant to the key protecting the object. Both the caller-side grant and key-owner permission are needed for the stated cross-account access path.
Incorrect Answers
A:Listing reveals object names when authorized but does not permit decryption. The stem already establishes that the S3 object-read permission path works, so an additional listing grant does not repair KMS authorization.
B:A bucket policy authorizes S3 access and cannot replace the KMS authorization path. KMS key usage must be authorized through the policies applicable to the encryption key and the caller.
E:Scheduling deletion manages the key lifecycle rather than decrypting data. Giving a reader destructive key-management permission is unnecessary and would not grant the missing cryptographic operation.
Question 17
A private S3 bucket already has the required access permissions. Security policy requires S3 to reject otherwise authorized object requests made over HTTP. Which bucket-policy condition should be used in an explicit deny to enforce this transport requirement?
- Deny when s3:VersionId is absent.
- Deny when aws:SecureTransport is true.
- Deny when aws:SecureTransport is false.
- Deny when the requested storage class is STANDARD.
Explanation
Correct Answer
C:The false value identifies requests using insecure transport. An explicit deny with this condition overrides otherwise applicable allows for the specified bucket and object resources. This enforces use of secure transport; a separate policy condition is needed if a minimum TLS version is also required.
Incorrect Answers
A:A version identifier selects an object version and does not describe the transport protocol. Rejecting its absence would block some legitimate HTTPS requests while leaving the intended condition unenforced.
B:The true value represents secure transport. Denying it reverses the requirement by rejecting HTTPS requests rather than the insecure requests identified in the scenario.
D:Storage class concerns how data is stored and retrieved, rather than whether a request uses HTTP or HTTPS. A storage-class restriction cannot express the required transport policy.
Question 18
A production member account belongs to an OU with an SCP explicitly denying ec2:StopInstances. An IAM administrator in that account has AdministratorAccess. No exception applies. What happens when that administrator calls StopInstances?
- The request is denied because the applicable SCP explicit deny limits the member-account principal.
- The request succeeds because AdministratorAccess overrides organization policies.
- The request succeeds if the administrator adds a second identity-policy allow.
- The request is evaluated only against the EC2 instance tags.
Explanation
Correct Answer
A:An SCP defines a permissions guardrail for principals in affected member accounts. An explicit deny at an applicable organization level cannot be overridden by a broader IAM allow. AdministratorAccess therefore does not permit this operation under the stated conditions.
Incorrect Answers
B:The managed administrator policy grants broad identity permissions but remains subject to applicable organization limits. It is not an exemption from the OU guardrail.
C:Another allow does not cancel an explicit deny. Resolving the denial would require an authorized change to the guardrail or a deliberately designed exception, rather than an additional account-level grant.
D:Tags can participate in condition evaluation when referenced by a policy. They do not replace evaluation of an applicable SCP action denial.
Question 19
A security account uses an AWS Config aggregator to view noncompliant resources across accounts and Regions. A manager expects the aggregator authorization itself to let analysts repair the source resources. Which statement correctly describes this configuration?
- Aggregation gives the security account administrator access in every source account.
- Creating the aggregator automatically starts every source configuration recorder.
- Changing a compliance result in the aggregator rewrites the source resource.
- Aggregation provides a read-only consolidated view; remediation requires separately authorized actions in the source environment.
Explanation
Correct Answer
D:Aggregators replicate information for centralized visibility without providing mutating source access. Automated remediation can be configured with appropriate rules, automation, and roles, but that is a separate control path. Analysts need the corresponding authorized workflow rather than relying on aggregator collection permission.
Incorrect Answers
A:The aggregation relationship permits collection of configuration and compliance information. It is not a general cross-account administrator delegation and does not authorize arbitrary source-resource changes.
B:An aggregator collects available source data; it does not automatically enable AWS Config recording in each source account and Region. Missing source recording must be addressed separately.
C:Compliance results describe evaluations and are not editable substitutes for resource configuration. Remediation must execute a supported change against the actual source resource.
Question 20
Platform engineers want to reject CloudFormation templates in CI when an S3 bucket resource omits a required encryption configuration. The check must run before deployment and use organization-authored declarative rules. Which tool is the closest fit?
- AWS Config aggregation after deployment.
- CloudFormation Guard in the CI pipeline.
- CloudTrail event history inspection after stack creation.
- IAM Access Analyzer external-access findings for deployed buckets.
Explanation
Correct Answer
B:Guard evaluates structured configuration data against declarative policy rules. Running it against the template in CI lets the pipeline reject a missing encryption property before deployment. The rule must target the expected template structure, and template validation complements rather than replaces checks of the deployed resource.
Incorrect Answers
A:Config evaluates recorded resource configuration and compliance information. Aggregating those findings provides deployed-state visibility, but it does not implement the requested template rule before a stack is created.
C:CloudTrail records API activity that has occurred. Reviewing stack-creation activity is retrospective and does not evaluate an organization rule against an undeployed template.
D:External-access analysis identifies resource policies that permit access beyond a defined trust boundary. That is a different property from validating the template encryption configuration before deployment.