Question 240
A bucket policy should permit only principals from the organization's current accounts. Which condition can reduce account-list maintenance?
- aws:PrincipalOrgID
- aws:SourceIp alone
- aws:CurrentTime alone
- aws:SourceAccount alone for every direct caller
Explanation
Correct Answer
A:The organization identifier can constrain matching principals without enumerating every member account, though required service access and exceptions need careful treatment.
Incorrect Answers
B:An address restriction describes network origin, not membership of the principal's AWS account in the organization.
C:Time conditions can bound access periods but cannot establish organization membership of the authenticated caller.
D:That key is particularly relevant to supported service-to-service contexts and is not a universal replacement for a principal's organization membership test.
Question 241
A resource policy permits an AWS service principal. Which conditions can reduce cross-service confused-deputy risk where supported?
- aws:SourceArn and aws:SourceAccount
- Only a generic wildcard principal
- Only an unrestricted service principal without source conditions
- Only the user's password policy
Explanation
Correct Answer
A:Source context binds service requests to the expected originating resource and account, rather than trusting every request from that service indiscriminately.
Incorrect Answers
B:Broadening the principal expands trust and omits the source-resource constraints needed to address the described risk.
C:Trusting the service broadly can leave requests originating from unintended customer resources inside the permission path where source restrictions are supported.
D:Workforce password requirements do not constrain the originating resource context of an AWS service-to-service request.
Question 242
A policy uses Action='s3:GetObject' but Resource is only the bucket ARN. Why does object retrieval fail through that statement?
- Add ListBucket while leaving the GetObject resource unchanged
- The policy must contain the user's password
- GetObject is always a bucket-listing action
- GetObject needs the relevant object resource ARN
Explanation
Correct Answer
D:Bucket and object operations use different resource types; the statement must match the target object's ARN, such as the approved prefix path.
Incorrect Answers
A:Listing permission authorizes a separate operation and does not repair the object-resource mismatch in the retrieval statement.
B:IAM policies define permissions and conditions, not secret credentials to be embedded in authorization documents.
C:Object retrieval is distinct from listing bucket contents and does not use only the bucket resource as its target.
Question 243
A policy permits s3:ListBucket on an object-prefix ARN. What is the resource mismatch?
- ListBucket is granted by the object filename
- ListBucket is an STS authentication operation
- ListBucket applies to the bucket ARN
- ListBucket needs only GetObject on the desired prefix
Explanation
Correct Answer
C:Prefix restrictions for listing use appropriate conditions on the bucket-level operation, rather than substituting an object ARN as its resource.
Incorrect Answers
A:Resource naming is not a permission grant, and the statement still needs the correct bucket-level resource match.
B:The action retrieves bucket listing information and does not issue or validate temporary security credentials.
D:Object retrieval and bucket enumeration are distinct permission checks, so allowing object reads alone cannot authorize listing the bucket.
Question 244
A user needs only to view a secret's metadata, not its value. Which permission should be withheld?
- secretsmanager:GetSecretValue
- secretsmanager:ListSecrets
- secretsmanager:DescribeSecret
- secretsmanager:ListSecretVersionIds
Explanation
Correct Answer
A:Retrieving the value exposes credential material. Metadata inspection should use the specific non-value operations required for the task.
Incorrect Answers
B:Listing exposes secret metadata, which can be consistent with the stated visibility need; it does not inherently retrieve the secret's plaintext value.
C:Describe provides metadata and is relevant to the permitted task, rather than inherently granting retrieval of the stored secret value.
D:Version metadata can support inspection without returning the secret material; the value-retrieval operation is the sensitive permission to exclude.
Question 245
A deployment user may update Lambda code on a function with an administrator execution role. What escalation concern exists?
- Updating code cannot affect downstream permissions in any way
- Administrator authority remains impossible without knowing the role's password
- The function automatically loses all permissions after an update
- The user can run code with the function's broader execution authority
Explanation
Correct Answer
D:Controlling code executed by a powerful role can yield that role's API capabilities even without direct permission to assume it interactively.
Incorrect Answers
A:The role configuration may stay unchanged, but attacker-controlled code can exercise the existing execution role's broad AWS permissions.
B:IAM roles do not rely on a reusable console password, and service-executed code can use the role's temporary credentials.
C:A code deployment does not inherently remove the execution role or its existing permissions.
Question 246
A role trust policy permits assumption, but its permissions policy allows no business API actions. What can an assumed session do?
- Every action listed in the role's trust-policy Action element
- Only actions permitted by other applicable grants, if any
- Every operation in the trusted account
- All operations allowed to the original caller
Explanation
Correct Answer
B:Trust authorizes obtaining the session; it does not itself grant access to every resource the role might be intended to manage.
Incorrect Answers
A:Trust-policy actions authorize assumption, rather than defining the role session's downstream business permissions on service resources.
C:Trust is an authentication relationship and does not automatically confer account-wide resource administration.
D:Role sessions use the assumed role's authorization context rather than inheriting the caller's full original identity policy.
Question 247
An organization uses SCP allow lists. A required service is absent from an applicable ancestor's allowed actions. What is the effect?
- The account administrator can bypass it with AdministratorAccess
- The deepest OU always overrides the root
- A lower-level allow cannot exceed the ancestor restriction
- An account-level SCP allow automatically cancels the ancestor's omission
Explanation
Correct Answer
C:The action must remain within the effective SCP permissions throughout the hierarchy; an account-level allow cannot reopen a blocked ancestor path.
Incorrect Answers
A:An account-local broad identity policy remains subject to the applicable organization guardrail.
B:SCP hierarchy is not a simple most-specific-wins model that discards restrictions imposed by ancestors.
D:An allow-list hierarchy requires the action to remain permitted at each applicable level, so the lower attachment cannot reopen the blocked path.
Question 248
An AccessDenied message includes an encoded authorization failure. Which authorized STS operation can help interpret it?
- GetCallerIdentity only
- AssumeRoleWithSAML
- CreateAccessKey
- DecodeAuthorizationMessage
Explanation
Correct Answer
D:When the service supplies an encoded message and the caller has permission, decoding can expose evaluation details useful for diagnosing the denied request.
Incorrect Answers
A:Identity inspection identifies the caller but does not decode the structured authorization context embedded in the error.
B:Federating a SAML identity issues temporary credentials and does not decode an existing authorization failure message.
C:Provisioning another long-term credential does not explain the policy condition or deny responsible for the failed request.
Question 249
A team wants to assess how proposed IAM statements evaluate before rollout. Which tool is relevant?
- A KMS key rotation
- IAM Policy Simulator
- CloudTrail history without policy simulation
- An IAM credential report
Explanation
Correct Answer
B:Simulation helps inspect selected actions and policy contexts, while its limitations mean real service and resource behavior may still require controlled validation.
Incorrect Answers
A:Rotating cryptographic material does not evaluate the semantics of a proposed identity policy before deployment.
C:Audit history shows past calls rather than evaluating the proposed statement and chosen context before the new policy is deployed.
D:Credential inventory describes authentication artifacts and does not simulate whether specific actions match the proposed policy's conditions and resources.
Question 250
A bucket policy unintentionally allows an external account. Which service helps identify that external-access path?
- The IAM Policy Simulator as a full continuous external-policy inventory
- IAM Access Analyzer
- EC2 Image Builder
- Route 53 health checks
Explanation
Correct Answer
B:External-access analysis evaluates supported resource policies against a defined trust zone, surfacing unintended access relationships for review and correction.
Incorrect Answers
A:Simulation helps examine selected requests, but it is not the same ongoing trust-zone analysis of supported resource policies and external access findings.
C:Image construction does not evaluate the bucket policy's trusted principals or external account access relationships.
D:Endpoint health signals do not determine which external IAM accounts a resource policy permits.