Curated

Security 2 (2.3)

0 votes

Questions21

  1. Question 1

    Security

    A role allows Amazon Bedrock inference, but an explicit deny on bedrock:InvokeModel blocks a restricted model; ConverseStream still succeeds against that model. Which additional denial closes this access path?

    Show the answer

    Correct answerA. Deny bedrock:InvokeModelWithResponseStream for the model.

    AWhy this is right: ConverseStream requires InvokeModelWithResponseStream permission, so this deny blocks the remaining access path.

    BWhy not this: InvokeModel controls nonstreaming inference; expanding its resource scope does not deny streaming inference.

    CWhy not this: GetFoundationModel retrieves model information; denying it does not block streaming inference.

    DWhy not this: ApplyGuardrail controls guardrail evaluation, not authorization to invoke a model through ConverseStream.

    ConverseStream requires bedrock:InvokeModelWithResponseStream, so denying that action blocks streaming access to the restricted model. Expanding an InvokeModel deny does not block the separate streaming permission.

    Open this question
  2. Question 2

    Security

    An application's role allows Amazon Bedrock model invocation, but requests fail because an AWS Organizations SCP explicitly denies it. What change can enable access while preserving the restriction for other roles?

    Show the answer

    Correct answerB. Exclude the application role from the SCP's deny.

    AWhy not this: An additional identity-policy allow cannot override an explicit deny in an SCP.

    BWhy this is right: A narrowly scoped exception removes the blocking deny for the application role while retaining it for other roles.

    CWhy not this: A VPC endpoint policy cannot override an explicit deny in an SCP.

    DWhy not this: A permissions boundary limits available permissions; it cannot override an SCP's explicit deny.

    The SCP's explicit deny must no longer apply to the application role before its IAM allow can take effect. An additional identity-policy allow cannot override an explicit deny.

    Open this question
  3. Question 3

    Security

    An application needs nonstreaming access to one Amazon Bedrock foundation model through InvokeModel. Which role policy permission provides the least privilege?

    Show the answer

    Correct answerC. Allow bedrock:InvokeModel on the approved model ARN.

    AWhy not this: The wildcard action grants more Bedrock operations than the application needs.

    BWhy not this: Listing available models does not authorize model invocation.

    CWhy this is right: The permission limits access to the required operation and the approved model.

    DWhy not this: The action is appropriate, but the resource scope includes models beyond the approved model.

    Restricting both the action and resource grants only the required invocation access. Allowing InvokeModel on all model resources grants access beyond the approved model.

    Open this question
  4. Question 4

    Security

    How should an AWS Lambda function obtain temporary AWS credentials to call Amazon Bedrock?

    Show the answer

    Correct answerB. Use its Lambda execution role.

    AWhy not this: A guardrail identifier selects filtering controls; it does not provide AWS credentials.

    BWhy this is right: Lambda assumes the execution role and provides temporary credentials to the function.

    CWhy not this: IAM user access keys are long-term credentials, not the function's temporary role credentials.

    DWhy not this: A VPC endpoint identifier identifies a network endpoint, not an AWS identity or credentials.

    Lambda provides temporary credentials for the function's execution role. IAM user access keys are long-term credentials and should not be embedded in the function.

    Open this question
  5. Question 5

    Security

    Which control encrypts application prompts and model responses while they travel to and from an Amazon Bedrock API endpoint?

    Show the answer

    Correct answerA. TLS-protected HTTPS connections

    AWhy this is right: TLS encrypts the connection carrying prompts and responses between the application and the API endpoint.

    BWhy not this: IAM determines whether a request is authorized; it does not provide transport encryption.

    CWhy not this: Content filtering evaluates model content; it does not encrypt network communications.

    DWhy not this: Encrypting stored logs protects data at rest, not prompts and responses traveling over the network.

    HTTPS uses TLS to encrypt requests and responses in transit. AWS KMS encryption of stored logs protects data at rest rather than data traveling between the application and the API endpoint.

    Open this question
  6. Question 6

    Security

    An application role must invoke Amazon Bedrock only through a designated VPC endpoint, even if its credentials are used elsewhere; other roles must retain public-endpoint access. Private DNS and a restrictive endpoint policy are already configured, but the application VPC must retain internet egress. Which additional control meets these requirements?

    Show the answer

    Correct answerB. Deny the application role's inference requests unless aws:SourceVpce matches the designated endpoint.

    AWhy not this: A conditional allow does not cancel an existing broad allow, so requests outside the endpoint could remain authorized.

    BWhy this is right: The explicit deny enforces the required endpoint path for the application role without affecting other roles.

    CWhy not this: An endpoint policy cannot restrict requests sent directly to a public service endpoint.

    DWhy not this: An organization-wide denial would also prevent other roles from retaining public-endpoint access.

    An explicit deny scoped to the application role blocks inference requests outside the designated endpoint, overriding other allows without restricting other roles. An endpoint policy governs traffic through that endpoint; it cannot block requests that bypass it.

    Open this question
  7. Question 7

    Security

    An application uses the standard Regional Amazon Bedrock Runtime hostname from a VPC. A working Runtime interface endpoint exists, but requests resolve to public IP addresses and use a NAT gateway. What should the developer change?

    Show the answer

    Correct answerC. Enable private DNS on the Runtime interface endpoint.

    AWhy not this: An endpoint policy limits authorized requests through the endpoint; it does not alter hostname resolution.

    BWhy not this: Sensitive information filtering controls content, not the network path used for inference requests.

    CWhy this is right: Private DNS directs the standard Runtime hostname to the interface endpoint's private IP addresses.

    DWhy not this: The control-plane endpoint serves management operations, not the application's Runtime inference calls.

    Private DNS makes the standard Regional Runtime hostname resolve to the interface endpoint's private IP addresses within the VPC. An endpoint policy controls access through the endpoint but does not change DNS resolution.

    Open this question
  8. Question 8

    Security

    A company plans to send confidential documents to a foundation model through Amazon Bedrock inference. Its policy prohibits using prompts or responses to train base models. What should the developer conclude about Bedrock's documented data handling?

    Show the answer

    Correct answerA. Bedrock does not use inference prompts or responses to train base models.

    AWhy this is right: Bedrock's documented data handling excludes inference prompts and responses from base-model training.

    BWhy not this: Invocation logging settings control logging, not whether inference data is used to train base models.

    CWhy not this: Private endpoints provide private connectivity, not a change to how inference data is used for training.

    DWhy not this: Denied-topic policies filter content; they do not establish Bedrock's training-use policy.

    Amazon Bedrock does not use inference prompts or responses to train base models. Private endpoints protect the network path, while invocation logging settings control customer-configured logs rather than model-training use.

    Open this question
  9. Question 9

    Security

    A banking assistant must reject requests for personalized investment recommendations, including requests that avoid familiar investment keywords. Which Amazon Bedrock Guardrails control best meets this requirement?

    Show the answer

    Correct answerC. A denied topic describing personalized investment advice

    AWhy not this: Word filters can miss requests that convey the prohibited meaning without the listed terms.

    BWhy not this: General harmful-content filtering does not define this business-specific prohibited subject.

    CWhy this is right: A denied topic can describe the prohibited subject and detect semantically related requests.

    DWhy not this: Financial identifier detection addresses sensitive data, not requests for investment recommendations.

    Denied topics define subject matter that the assistant must not discuss, supporting detection beyond exact keywords. Word filters match specified words or phrases and can miss paraphrased requests.

    Open this question
  10. Question 10

    Security

    Which Amazon Bedrock Guardrails feature evaluates model responses for categories such as hate, violence, and sexual content?

    Show the answer

    Correct answerB. Content filters

    AWhy not this: Invocation permissions determine who can call models, not whether responses contain harmful content.

    BWhy this is right: Content filters evaluate supported harmful-content categories in model inputs and outputs.

    CWhy not this: Logging controls govern recorded interaction data rather than classify harmful responses.

    DWhy not this: Sensitive information filters detect sensitive data rather than these harmful-content categories.

    Content filters evaluate supported harmful-content categories, including hate, violence, and sexual content. Sensitive information filters instead detect information such as personally identifiable information.

    Open this question
  11. Question 11

    Security

    An application calls a model hosted outside Amazon Bedrock and must enforce a Bedrock guardrail before generation and before displaying responses. Which integration meets both requirements?

    Show the answer

    Correct answerC. Use ApplyGuardrail for inputs and outputs, enforcing its results in the application.

    AWhy not this: An external model endpoint does not apply Bedrock guardrails merely because its request includes a guardrail identifier.

    BWhy not this: Evaluation after display cannot prevent users from receiving disallowed responses.

    CWhy this is right: Independent input and output evaluations let the application enforce guardrail results before generation and display.

    DWhy not this: IAM cannot make an external model endpoint evaluate content with a Bedrock guardrail.

    ApplyGuardrail evaluates content independently of model invocation, allowing an application to check external-model inputs and outputs and enforce the results. Attaching a Bedrock guardrail identifier to an external provider's request does not integrate that provider with Bedrock Guardrails.

    Open this question
  12. Question 12

    Security

    A Bedrock application must preserve useful responses while masking detected email addresses and blocking user attempts to override system instructions. Which guardrail configurations address these requirements? (Choose two.)

    Choose 2 answers

    Show the answer

    Correct answersA. Configure sensitive information filters to anonymize email addresses.D. Configure prompt attack filtering for evaluated user input.

    AWhy this is right: Anonymization masks detected email addresses without requiring the entire response to be blocked.

    BWhy not this: Blocking a topic rejects relevant subject matter rather than selectively masking email addresses.

    CWhy not this: Matching words does not identify manipulation attempts that use different wording.

    DWhy this is right: Prompt attack filtering evaluates attempts to manipulate the model or override its instructions.

    Sensitive information filters can anonymize detected email addresses, while prompt attack filtering addresses attempts to override instructions. Denied topics would block subject matter rather than preserve useful responses with masked addresses; word filters cannot recognize varied manipulation attempts.

    Open this question
  13. Question 13

    Security

    A support application reuses one agent conversation session for unrelated signed-in users. Responses sometimes reference a previous user's support details. Which change best addresses the cause?

    Show the answer

    Correct answerA. Bind separate conversation sessions to authenticated users

    AWhy this is right: Separate, user-bound sessions keep one user's conversation state out of another user's interaction.

    BWhy not this: Encryption at rest does not prevent the application from loading another user's conversation context.

    CWhy not this: Filtering might mask detected details, but unrelated users would still share conversation context.

    DWhy not this: Disabling logs does not separate the conversation state used to generate responses.

    User-bound conversation sessions prevent unrelated users from sharing conversational context. Sensitive information filtering might mask some details but does not correct the shared-session boundary.

    Open this question
  14. Question 14

    Security

    An AI agent obtains manager approval for a refund amount and recipient, but can revise those parameters before calling the payment tool. Which control best prevents an unapproved payment?

    Show the answer

    Correct answerA. Bind approval to exact parameters and verify them before execution

    AWhy this is right: Execution-time verification ensures that the payment matches the approved action; changed parameters require new approval.

    BWhy not this: Sensitive information filtering does not establish whether the manager approved the amount and recipient.

    CWhy not this: Audit logs support investigation after execution but do not prevent an unapproved payment.

    DWhy not this: Session-level approval could permit a payment whose parameters differ from those the manager reviewed.

    Approval must be bound to the exact action parameters and checked at execution; changes require new approval. Approving an entire session does not establish that a revised payment was authorized.

    Open this question
  15. Question 15

    Security

    An AI agent uses a shared application role to retrieve invoices through a tool. Users may retrieve only their own invoices. Which control should the developer implement?

    Show the answer

    Correct answerB. Authorize each tool request against the authenticated user

    AWhy not this: Redaction can hide identifiers but does not prevent unauthorized invoice retrieval.

    BWhy this is right: Checking the authenticated user's rights at the tool boundary prevents access beyond that user's permissions.

    CWhy not this: Model instructions are not a security boundary and cannot replace enforced access checks.

    DWhy not this: Private connectivity protects the network path, not access to individual invoices.

    The tool must enforce the authenticated user's access rights before retrieving an invoice. Model instructions can guide behavior but cannot enforce authorization.

    Open this question
  16. Question 16

    Security

    Which control requires a person to review and authorize an AI agent's proposed sensitive action before execution?

    Show the answer

    Correct answerC. Human-in-the-loop approval

    AWhy not this: Invocation logging records interactions but does not require approval before execution.

    BWhy not this: Sensitive information detection identifies protected data rather than approving actions.

    CWhy this is right: A person reviews the proposed action and must approve it before execution proceeds.

    DWhy not this: A denied topic policy restricts subject matter rather than requiring a person's authorization.

    Human-in-the-loop approval gates execution on a person's decision. A denied topic policy restricts conversational subject matter rather than authorizing a specific action.

    Open this question
  17. Question 17

    Security

    An AI application's CloudWatch Logs group contains sensitive diagnostic records and retains them indefinitely. Policy permits retaining those records for only seven days. What should the developer configure?

    Show the answer

    Correct answerC. A seven-day CloudWatch Logs retention policy.

    AWhy not this: Key rotation changes encryption key material; it does not set the lifetime of log records.

    BWhy not this: Credential expiration limits authentication sessions, not the retention of existing logs.

    CWhy this is right: A seven-day retention policy sets the permitted lifetime for events in the log group.

    DWhy not this: Exporting logs creates another copy without establishing expiration for the source records.

    A log group retention policy expires records according to the permitted retention period. Exporting logs copies them elsewhere and does not remove the source records.

    Open this question
  18. Question 18

    Security

    A CloudWatch Logs group contains historical AI prompts with PII; a newly added data protection policy masks matching PII in new events. Operators must retain ordinary log access without retrieving unmasked PII, and historical events need remediation. Which plan meets these requirements?

    Show the answer

    Correct answerC. Delete the log streams with historical PII, retain the policy, and deny operators logs:Unmask.

    AWhy not this: Allowing logs:Unmask lets operators retrieve unmasked sensitive data despite the masking policy.

    BWhy not this: KMS permissions do not provide field-level masking while preserving ordinary log access.

    CWhy this is right: Deleting the affected log streams removes the historical PII, future events remain masked, and operators cannot bypass masking.

    DWhy not this: Data protection policies do not retroactively mask events ingested before the policy was applied.

    CloudWatch Logs data protection masking is not retroactive, so affected historical data requires separate remediation; because CloudWatch Logs cannot delete individual events, that means deleting the log streams that contain them. Denying logs:Unmask prevents operators from bypassing masking; the new policy alone does not protect earlier events.

    Open this question
  19. Question 19

    Security

    An application logs incoming prompts before sending them to Bedrock, where a guardrail masks detected email addresses in responses. Users receive masked responses, but developers find email addresses in application logs. Which change addresses the exposure while preserving sanitized diagnostic content?

    Show the answer

    Correct answerC. Redact email addresses before the application emits log records.

    AWhy not this: Additional response filtering does not change prompts already written to application logs.

    BWhy not this: Private connectivity protects transmission but does not sanitize application log records.

    CWhy this is right: Redacting at the logging boundary prevents raw email addresses from entering diagnostic logs.

    DWhy not this: A denied topic policy does not sanitize records written before the model request is evaluated.

    The exposure occurs when the application writes raw prompts, so redaction must occur before log emission. Response masking does not sanitize an earlier application log entry.

    Open this question
  20. Question 20

    Security

    A Bedrock application needs request counts, latency, and error rates, but company policy prohibits storing prompts or responses in monitoring logs. What should the developer do?

    Show the answer

    Correct answerC. Record operational metadata without request or response bodies.

    AWhy not this: A VPC endpoint protects the network path, not the contents written to monitoring logs.

    BWhy not this: Encryption protects stored logs but does not prevent prompts and responses from being stored.

    CWhy this is right: Counts, timing, and error metadata support monitoring without recording model inputs or outputs.

    DWhy not this: Short retention still permits prohibited content to be stored before expiration.

    Operational metadata supports monitoring without retaining prompt or response content. Encryption protects stored content but does not satisfy a prohibition on storing it.

    Open this question
  21. Question 21

    Security

    Which controls protect confidential AI interaction logs against unauthorized access? (Choose two.)

    Choose 2 answers

    Show the answer

    Correct answersA. Encrypt stored logs with AWS KMS.D. Restrict log-reading permissions with IAM.

    AWhy this is right: KMS encryption protects the confidentiality of stored log data.

    BWhy not this: Tool approval controls agent actions rather than access to stored logs.

    CWhy not this: Content filtering evaluates model content rather than securing log storage.

    DWhy this is right: IAM permissions limit which identities can retrieve confidential log records.

    EWhy not this: Denied topics control model content, not authorization to read monitoring logs.

    Encryption protects stored log data, and IAM restricts who can read it. Model filters and agent approvals govern AI behavior rather than access to existing logs.

    Open this question