Curated

Security and Compliance (6.1–6.3)

0 votes

Questions52

  1. Question 1

    Security and Compliance

    An application on Amazon EC2 must read objects from an S3 bucket without storing long-term credentials. Which approach should a DevOps engineer use?

    Show the answer

    Correct answerD. Attach an IAM role through an instance profile.

    AWhy not this: IAM user access keys remain long-term credentials even when stored in Parameter Store.

    BWhy not this: IAM groups contain IAM users, not EC2 instances.

    CWhy not this: An SCP limits available permissions; it does not grant permissions or supply application credentials.

    DWhy this is right: An instance profile makes role-based temporary credentials available to applications on the EC2 instance.

    An EC2 instance profile supplies an IAM role whose temporary credentials the application can use. Storing IAM user access keys in Parameter Store protects their storage but does not eliminate long-term credentials.

    Open this question
  2. Question 2

    Security and Compliance

    An external CI service issues OpenID Connect tokens containing repository and branch claims. A deployment pipeline must obtain temporary AWS credentials only for an approved repository and branch; which approach should the engineer use?

    Show the answer

    Correct answerB. Configure an IAM OIDC provider and condition the role's trust on token claims.

    AWhy not this: A SAML provider expects SAML assertions and does not consume the service's OIDC tokens.

    BWhy this is right: OIDC federation supports temporary role credentials, and trust conditions can restrict the repository and branch claims.

    CWhy not this: IAM Identity Center account assignments target users and groups, not CI repository identities.

    DWhy not this: Rotating access keys still requires managing IAM user credentials and does not validate the issued token claims.

    An IAM OIDC provider lets the pipeline exchange its token for temporary role credentials, with trust-policy conditions restricting accepted claims. SAML federation requires SAML assertions, not the OIDC tokens issued by this service.

    Open this question
  3. Question 3

    Security and Compliance

    A deployment broker assumes one IAM role that permits deployment to several applications; each job must receive credentials restricted to its assigned application. Without changing the shared role or account-wide controls between jobs, how should the broker restrict each session?

    Show the answer

    Correct answerD. Pass a restrictive session policy when assuming the role.

    AWhy not this: Changing the shared role's boundary affects the role rather than independently restricting each job's session.

    BWhy not this: An SCP affects organizational permission limits, not an individual assumed-role session.

    CWhy not this: A trust policy controls who can assume a role, not which application resources the session can deploy.

    DWhy this is right: A session policy can narrow each job's temporary permissions without changing the shared role.

    A session policy restricts a particular assumed-role session to the intersection of the role's permissions and the session policy. A permissions boundary applies to the shared role rather than independently tailoring each job's session.

    Open this question
  4. Question 4

    Security and Compliance

    A company uses an external identity provider for workforce authentication and group membership, and needs centralized access to 80 AWS accounts. It requires automatic user and group provisioning, group-based account assignments, and no separately maintained IAM users; which design best meets these requirements?

    Show the answer

    Correct answerB. Use an IAM Identity Center organization instance with SAML authentication, SCIM provisioning, and group-based permission sets.

    AWhy not this: Per-account SAML federation lacks the required centralized account assignments and automatic Identity Center directory provisioning.

    BWhy this is right: SAML, SCIM, and group-based permission-set assignments together satisfy authentication, provisioning, and multi-account access needs.

    CWhy not this: The built-in directory does not retain the external provider as the authentication source, and IAM users violate the requirement.

    DWhy not this: Manual provisioning fails the requirement to provision users and groups automatically.

    An IAM Identity Center organization instance centralizes multi-account access: SAML provides external authentication, SCIM provisions users and groups, and permission-set assignments grant account access. SAML alone does not provide automatic directory provisioning.

    Open this question
  5. Question 5

    Security and Compliance

    An ABAC policy allows developers to stop EC2 instances whose Project tag matches their protected principal tag, but a separate policy lets them retag any instance. Which change closes the cross-project access path while retaining routine tagging?

    Show the answer

    Correct answerC. Reserve changes to instance Project tags for a trusted administrative role.

    AWhy not this: MFA strengthens authentication but leaves the permission to manipulate authorization tags unchanged.

    BWhy not this: Shorter sessions do not prevent developers from retagging an instance during a valid session.

    CWhy this is right: Protecting the Project resource tag prevents developers from changing an instance's authorization classification.

    DWhy not this: Transitive tags preserve session attributes across role chaining but do not protect instance tags.

    Developers could retag another project's instance to match their own Project value and then stop it. Reserving changes to the authorization tag protects the ABAC boundary while allowing other tagging; MFA authenticates callers but does not prevent authorized tag manipulation.

    Open this question
  6. Question 6

    Security and Compliance

    An application must download objects only from the reports/ prefix in one S3 bucket; it already knows each object's key and does not list objects. Which IAM permission should its role receive?

    Show the answer

    Correct answerA. Allow s3:GetObject on the bucket's reports/* object ARNs.

    AWhy this is right: The action permits downloads, and the object ARN pattern limits access to the required prefix.

    BWhy not this: This grants access to objects outside the required prefix.

    CWhy not this: s3:GetObject applies to objects, not the bucket ARN.

    DWhy not this: s3:ListBucket permits listing keys but does not permit downloading objects.

    s3:GetObject requires object ARNs, and restricting those ARNs to reports/* grants only the required access. A prefix-restricted s3:ListBucket permission permits listing, not downloading objects.

    Open this question
  7. Question 7

    Security and Compliance

    A company tags IAM roles and EC2 instances with Project values and wants one reusable policy that permits starting instances only within the caller's project. Which policy condition implements this requirement?

    Show the answer

    Correct answerB. Compare aws:ResourceTag/Project with aws:PrincipalTag/Project.

    AWhy not this: Account matching does not distinguish projects that share an AWS account.

    BWhy this is right: Matching the instance's Project tag to the role's Project tag enforces project-specific access.

    CWhy not this: Region matching restricts location, not access according to project membership.

    DWhy not this: A role allowlist does not associate each caller with instances bearing its Project value.

    Matching resource and principal Project tags implements attribute-based authorization with a reusable policy. An approved role ARN list identifies callers but does not dynamically match each caller to instances belonging to its project.

    Open this question
  8. Question 8

    Security and Compliance

    Developers must create application roles and attach identity policies, but each role's effective identity-based permissions must remain within a centrally defined maximum. Which design meets this requirement while preserving delegated role management?

    Show the answer

    Correct answerC. Require a permissions boundary on each role and prevent developers from changing or removing it.

    AWhy not this: A trust policy controls who can assume a role, not the role's maximum service permissions.

    BWhy not this: An instance profile delivers a role to EC2 instances; it does not limit the role's permissions.

    CWhy this is right: A protected, mandatory boundary limits the permissions developers can grant through identity policies.

    DWhy not this: An attached managed policy does not cap permissions granted by additional identity policies.

    A permissions boundary caps the permissions that identity-based policies can grant. Requiring the boundary and protecting it preserves that ceiling; an attached managed policy grants permissions but does not limit permissions granted by additional policies.

    Open this question
  9. Question 9

    Security and Compliance

    An Application Load Balancer uses an ACM-issued public certificate validated through DNS. Which action should a deployment pipeline take to preserve eligibility for automatic renewal?

    Show the answer

    Correct answerD. Retain the ACM validation CNAME records in public DNS.

    AWhy not this: Imported certificates are not eligible for ACM managed renewal and require replacement through a separate process.

    BWhy not this: KMS key rotation does not renew an ACM public certificate or validate ownership of its domain names.

    CWhy not this: DNS validation records are needed for renewal, not just initial certificate issuance.

    DWhy this is right: Keeping the validation CNAME records publicly resolvable allows ACM to validate domain ownership during managed renewal.

    ACM can automatically renew an in-use, DNS-validated public certificate when its validation CNAME records remain available in public DNS. Removing those records after issuance prevents ACM from completing DNS validation for renewal.

    Open this question
  10. Question 10

    Security and Compliance

    Which service can inspect HTTP request parameters for SQL injection attempts before requests reach an Application Load Balancer's targets?

    Show the answer

    Correct answerC. AWS WAF

    AWhy not this: Amazon GuardDuty detects threats from supported data sources; it does not filter incoming ALB requests.

    BWhy not this: AWS Certificate Manager manages TLS certificates, not malicious HTTP request filtering.

    CWhy this is right: AWS WAF supports SQL injection match statements that inspect web request components.

    DWhy not this: AWS Shield Standard provides DDoS protection, not inspection of request parameters for SQL injection patterns.

    AWS WAF can inspect web requests for SQL injection patterns and block matching requests. AWS Shield Standard provides DDoS protection rather than SQL injection request filtering.

    Open this question
  11. Question 11

    Security and Compliance

    After an automated routing update, TCP connections through AWS Network Firewall fail even though its stateful rules allow them. Logs show requests traversing one firewall endpoint and responses traversing another; what should the engineer change?

    Show the answer

    Correct answerB. Route both directions of each connection through the same firewall endpoint.

    AWhy not this: Additional allow rules cannot restore connection state when the two directions traverse different endpoints.

    BWhy this is right: Symmetric routing lets the same firewall endpoint track requests and responses as one connection.

    CWhy not this: Network ACL port rules do not correct requests and responses traversing different firewall endpoints.

    DWhy not this: Security groups automatically allow response traffic for permitted connections; adding rules does not correct asymmetric firewall routing.

    AWS Network Firewall requires symmetric routing so its stateful engine can track both directions of a connection through the same endpoint. Additional stateful allow rules do not fix traffic taking different endpoints.

    Open this question
  12. Question 12

    Security and Compliance

    A company needs consistent AWS Security Hub CSPM (formerly AWS Security Hub) standards and control settings across an organizational unit and several Regions. Newly added accounts must inherit those settings; which approach requires the least ongoing administration?

    Show the answer

    Correct answerD. Use central configuration policies associated with the organizational unit.

    AWhy not this: Copying findings changes where findings are received, not which standards and controls member accounts enable.

    BWhy not this: A Config aggregator collects configuration and compliance data without applying Security Hub CSPM settings.

    CWhy not this: Finding aggregation centralizes visibility; it does not make new accounts inherit standards and control settings.

    DWhy this is right: An organizational-unit policy association provides inherited configuration for existing and newly added accounts.

    Security Hub CSPM central configuration policies can apply standards and control settings to organizational units across the home and linked Regions, including new accounts. Finding aggregation centralizes findings but does not enforce those settings.

    Open this question
  13. Question 13

    Security and Compliance

    A two-AZ application uses AWS WAF on its public load balancer and private instances with NAT-based internet egress. Outbound HTTPS must be restricted to approved TLS SNI domain names without decryption, while preserving AZ independence and stateful inspection in both directions; which design BEST meets these requirements?

    Show the answer

    Correct answerA. Retain WAF; apply Network Firewall TLS domain rules through per-AZ endpoints, with symmetric routes through each AZ's firewall and NAT gateway.

    AWhy this is right: TLS SNI rules enforce domain filtering, while per-AZ symmetric paths preserve stateful inspection and AZ independence.

    BWhy not this: Network ACLs filter addresses, protocols, and ports; they cannot enforce TLS SNI domain-name rules.

    CWhy not this: A shared firewall endpoint creates an AZ dependency even if routing is symmetric.

    DWhy not this: Return traffic that bypasses the firewall breaks the symmetric path required for stateful inspection.

    Network Firewall stateful domain rules can inspect TLS SNI without decrypting traffic. Per-AZ endpoints and NAT gateways with symmetric routing preserve AZ independence and bidirectional inspection; a shared endpoint introduces a cross-AZ dependency.

    Open this question
  14. Question 14

    Security and Compliance

    An internet-facing Application Load Balancer terminates HTTPS and forwards requests to EC2 instances with public IP addresses. The company must block SQL injection attempts and prevent clients from bypassing application inspection; which combination BEST meets these requirements?

    Show the answer

    Correct answerD. Associate AWS WAF with the load balancer; allow the instance application port only from the load balancer security group.

    AWhy not this: GuardDuty detects threats but does not provide inline SQL injection filtering.

    BWhy not this: Subnet CIDRs also permit other resources in those subnets to reach the application without passing through WAF.

    CWhy not this: Config detects configuration issues; approved clients could still reach the instances without application inspection.

    DWhy this is right: WAF provides application-layer inspection, and the security-group reference prevents direct client access to the application port.

    AWS WAF inspects HTTP requests for SQL injection, while referencing the load balancer security group restricts application access to traffic from the load balancer. Allowing entire load balancer subnets also trusts other resources in those subnets.

    Open this question
  15. Question 15

    Security and Compliance

    Which approaches automate security-control deployment or execution across AWS accounts and Regions? (Choose three.)

    Choose 3 answers

    Show the answer

    Correct answersA. Execute cross-account, cross-Region AWS Systems Manager Automation runbooks.B. Deploy security resources with AWS CloudFormation StackSets.E. Apply governance controls through AWS Control Tower.

    AWhy this is right: Automation supports running security-management runbooks across multiple accounts and Regions.

    BWhy this is right: StackSets can deploy standardized security resources to multiple accounts and Regions.

    CWhy not this: ACM certificate renewal manages certificate lifecycles rather than deploy organizational security controls.

    DWhy not this: Macie discovery jobs classify sensitive data in S3 rather than deploy security controls across environments.

    EWhy this is right: Control Tower applies governance controls to organizational units and their enrolled accounts.

    FWhy not this: KMS key rotation manages cryptographic key material rather than deploy controls across accounts and Regions.

    StackSets deploy resources across accounts and Regions, Control Tower applies governance controls, and Systems Manager Automation executes cross-account, cross-Region runbooks. Macie automates sensitive-data discovery rather than deployment of security controls.

    Open this question
  16. Question 16

    Security and Compliance

    After an unauthorized security group change, an auditor needs the recorded rule configuration before the change and the identity that submitted the modifying API request. Which evidence sources should the auditor use, assuming recording was enabled beforehand? (Choose two.)

    Choose 2 answers

    Show the answer

    Correct answersC. AWS Config resource configuration historyE. AWS CloudTrail management events

    AWhy not this: Threat findings can flag suspicious activity but do not supply a complete configuration history or API audit record.

    BWhy not this: External access findings identify supported resources shared externally, not historical security group rules or API callers.

    CWhy this is right: Recorded configuration items show the security group's rules at earlier points in time.

    DWhy not this: Flow records describe network traffic rather than security group configuration changes or their API callers.

    EWhy this is right: Management events record security group API activity and the identity associated with each request.

    AWS Config records security group configuration history, while CloudTrail management events identify the principal that submitted a modifying API request. VPC Flow Logs record network traffic metadata, not rule configurations or API caller identities.

    Open this question
  17. Question 17

    Security and Compliance

    A company delivers an organization trail to Amazon S3 and must provide cryptographic evidence of subsequent log alteration or deletion, without preventing authorized lifecycle expiration. Log file integrity validation has been enabled since delivery began; which action should the auditor take to verify a retained period?

    Show the answer

    Correct answerC. Validate the CloudTrail digest chain and compare the referenced log file hashes.

    AWhy not this: Configuration history documents resource changes, not the integrity of individual delivered log files.

    BWhy not this: Encryption protects confidentiality; its configuration and key usage do not establish that delivered log files remain unchanged.

    CWhy this is right: Signed digests and referenced hashes provide evidence of altered or missing delivered log files.

    DWhy not this: Object Lock enforces retention rather than retrospectively validating integrity and can prevent lifecycle expiration during retention.

    CloudTrail digest validation uses signed digest files and log hashes to detect changes or missing files in the retained period. S3 Object Lock prevents deletion or overwriting during retention; it does not retrospectively verify delivered log integrity.

    Open this question
  18. Question 18

    Security and Compliance

    An S3 bucket's CloudFormation template omits VersioningConfiguration, and an administrator later enables versioning outside CloudFormation. With no other changes, drift detection reports the bucket as IN_SYNC; what best explains this result?

    Show the answer

    Correct answerC. CloudFormation compares only property values explicitly defined in the template.

    AWhy not this: CloudFormation drift detection does not depend on an AWS Config recorder.

    BWhy not this: VersioningConfiguration can participate in drift detection when explicitly defined in the template.

    CWhy this is right: An omitted property is not compared with the live value, even when the service supplies a default.

    DWhy not this: Drift detection compares actual state with the template; it does not update the template to adopt live values.

    CloudFormation checks drift only for property values explicitly defined in the template, including explicitly supplied defaults. Omitting VersioningConfiguration leaves it outside that comparison; AWS Config recording is not a prerequisite for drift detection.

    Open this question
  19. Question 19

    Security and Compliance

    A developer creates the role AppRole with the permissions boundary DevBoundary, which allows s3:* and dynamodb:*. AppRole's identity policy allows s3:GetObject and sqs:SendMessage. No SCPs, session policies, or resource-based policies affect these requests. Which actions can AppRole perform?

    Show the answer

    Correct answerC. s3:GetObject only

    AWhy not this: sqs:SendMessage is outside the boundary, so the identity policy's allow for it has no effect.

    BWhy not this: A boundary only limits permissions; the role's identity policy never grants DynamoDB actions or most S3 actions.

    CWhy this is right: Only s3:GetObject is allowed by both the identity policy and the boundary.

    DWhy not this: Effective permissions are the intersection of the two policies, not their union.

    A permissions boundary sets the maximum permissions; it grants nothing. Effective permissions are the intersection of the identity policy and the boundary, so only s3:GetObject, which both allow, is permitted.

    Open this question
  20. Question 20

    Security and Compliance

    An engineer adds an SCP allowing Amazon DynamoDB actions to a member account, but an application role still cannot create tables. The role has no policy granting that action; what must the engineer do?

    Show the answer

    Correct answerA. Attach an identity-based policy allowing table creation to the role.

    AWhy this is right: An identity-based policy can grant the table-creation permission that the role currently lacks.

    BWhy not this: A role trust policy determines who can assume the role, not which DynamoDB actions it can perform.

    CWhy not this: A permissions boundary limits identity-based permissions and does not supply the missing grant.

    DWhy not this: Repeating an SCP allow higher in the hierarchy does not grant permissions to the application role.

    An SCP defines the maximum available permissions but does not grant them. The role needs an identity-based allow; a permissions boundary also limits permissions rather than granting them.

    Open this question
  21. Question 21

    Security and Compliance

    A member account has AdministratorAccess and a directly attached FullAWSAccess SCP; the root also has FullAWSAccess. Its parent OU has only an SCP allowing Amazon S3 actions, with no explicit denies anywhere; how should an engineer enable EC2 actions while retaining the OU's allow-list model?

    Show the answer

    Correct answerC. Add the required EC2 actions to the parent OU's SCP.

    AWhy not this: AdministratorAccess already grants EC2 permissions; another identity policy cannot expand the OU's SCP limit.

    BWhy not this: A permissions boundary cannot expand permissions excluded by an SCP at the OU.

    CWhy this is right: Allowing EC2 at the OU fills the missing allow while retaining the OU's allow-list approach.

    DWhy not this: The account already allows all actions through FullAWSAccess, so another account-level allow changes nothing.

    With SCP allow lists, an action must be allowed at every level from the root through the account. The OU lacks an EC2 allow, so adding another account-level allow cannot resolve the restriction.

    Open this question
  22. Question 22

    Security and Compliance

    An organization-root SCP explicitly denies ec2:TerminateInstances without conditions. A member-account root user, an EC2 Auto Scaling service-linked role in that member account, and a management-account administrator each submit otherwise-authorized termination requests; whose requests does this SCP block?

    Show the answer

    Correct answerD. The member-account root user, without blocking either of the other principals.

    AWhy not this: The member-account root user is restricted, but service-linked roles are not restricted by SCPs.

    BWhy not this: The member-account root user is restricted, but management-account principals are not restricted by SCPs.

    CWhy not this: Neither service-linked roles nor management-account principals are restricted by SCPs.

    DWhy this is right: Only the member-account root user falls within the SCP's enforcement scope among these principals.

    SCPs restrict member-account root users, but do not restrict service-linked roles or principals in the management account. Attaching the SCP at the organization root does not remove those scope exceptions.

    Open this question
  23. Question 23

    Security and Compliance

    Which IAM entities support attaching a permissions boundary? (Choose two.)

    Choose 2 answers

    Show the answer

    Correct answersB. IAM usersD. IAM roles

    AWhy not this: IAM groups support permissions policies but cannot have permissions boundaries.

    BWhy this is right: An IAM user can have a permissions boundary that limits its identity-based permissions.

    CWhy not this: An IAM identity provider establishes federation trust and cannot have a permissions boundary.

    DWhy this is right: An IAM role can have a permissions boundary that limits its identity-based permissions.

    EWhy not this: A managed policy can serve as a boundary, but cannot itself have a boundary attached.

    Permissions boundaries can be attached to IAM users and IAM roles. IAM groups can have permissions policies, but they do not support permissions boundaries.

    Open this question
  24. Question 24

    Security and Compliance

    A company retains CloudTrail logs in Amazon S3, but auditors need evidence that delivered log files have not been modified or deleted. Which solution BEST meets this requirement?

    Show the answer

    Correct answerB. Enable CloudTrail log file integrity validation and validate the digest chain.

    AWhy not this: SSE-KMS protects confidentiality at rest; key usage records do not establish log file integrity.

    BWhy this is right: Signed digest files and their chain allow validation to detect modified or deleted CloudTrail log files.

    CWhy not this: Access logs record requests but do not cryptographically establish that CloudTrail log contents remain unchanged.

    DWhy not this: Versioning preserves versions but does not cryptographically verify the integrity of delivered CloudTrail logs.

    CloudTrail integrity validation produces signed digest files that support detecting changes or deletions during validation. S3 Versioning preserves object versions but does not provide CloudTrail's cryptographic integrity verification.

    Open this question
  25. Question 25

    Security and Compliance

    A company needs centralized management-event auditing across every enabled AWS Region in its organization, including accounts added later. Member-account administrators must not be able to stop the required trail; which design meets these requirements with the least ongoing administration?

    Show the answer

    Correct answerD. Create a multi-Region organization trail with a central S3 destination from the management account.

    AWhy not this: Single-Region trails require additional administration when more Regions are enabled.

    BWhy not this: Bucket write permissions do not extend a management-account trail's collection scope to member accounts.

    CWhy not this: Locally owned trails can be stopped by local administrators, so this does not enforce the required audit coverage.

    DWhy this is right: An organization trail extends to new member accounts, spans enabled Regions, and cannot be stopped by member administrators.

    A multi-Region organization trail covers organization accounts, including new members, and member administrators cannot modify or stop it. A management-account trail without organization scope records only that account's events, regardless of the destination bucket policy.

    Open this question
  26. Question 26

    Security and Compliance

    Which services provide event-pattern matching and email notification delivery for Amazon GuardDuty findings? (Choose two.)

    Choose 2 answers

    Show the answer

    Correct answersB. Amazon Simple Notification ServiceC. Amazon EventBridge

    AWhy not this: Athena queries stored data; it does not provide event-pattern routing or email subscription delivery.

    BWhy this is right: Amazon SNS delivers notifications to confirmed email subscriptions on a topic.

    CWhy this is right: EventBridge rules match GuardDuty finding events and route them to configured targets.

    DWhy not this: CloudTrail audits API activity; it does not route GuardDuty findings to email subscribers.

    EWhy not this: CloudWatch Logs stores and processes logs rather than providing this event-routing and email-delivery combination.

    FWhy not this: AWS Config tracks resource configuration and compliance rather than delivering GuardDuty finding emails.

    EventBridge rules match GuardDuty finding events and can target an SNS topic with email subscriptions. CloudWatch Logs can retain logs, but it is not the event-routing and email-delivery combination required here.

    Open this question
  27. Question 27

    Security and Compliance

    A CloudTrail trail records write management events, and security engineers need notifications when API call volume deviates from the account's normal activity. Which solution avoids maintaining fixed thresholds?

    Show the answer

    Correct answerA. Enable CloudTrail Insights API call rate analysis and route its events through EventBridge to SNS.

    AWhy this is right: Insights detects abnormal API call rates, and EventBridge can deliver the resulting events to an SNS topic.

    BWhy not this: A fixed daily limit does not adapt to normal activity patterns and adds scheduled-query maintenance.

    CWhy not this: Matching every write event generates notifications for normal activity as well as unusual activity.

    DWhy not this: A fixed request-count alarm requires threshold maintenance and does not establish normal API behavior.

    CloudTrail Insights identifies unusual write management API call rates against established activity patterns; EventBridge can route its events to SNS. A metric filter with a fixed threshold counts activity but does not adapt to the account's normal behavior.

    Open this question
  28. Question 28

    Security and Compliance

    An auditor needs a historical timeline of a security group's inbound rules, including its configuration before each change. Which capability should a DevOps engineer enable to maintain this evidence?

    Show the answer

    Correct answerD. AWS Config recording for security groups

    AWhy not this: Application log retention preserves application messages, not security group configurations.

    BWhy not this: CloudTrail records API actions rather than maintaining historical resource configuration states.

    CWhy not this: VPC Flow Logs describe network traffic, not the historical definitions of security group rules.

    DWhy this is right: AWS Config records security group configurations and maintains a timeline of their changes.

    AWS Config records supported resource configurations and maintains their configuration history. CloudTrail records API activity, but its event history is not a resource configuration timeline.

    Open this question
  29. Question 29

    Security and Compliance

    A Secrets Manager rotation function updates a database password, but its testSecret step fails before finishSecret runs. Which actions preserve the rotation workflow's validation safeguard? (Choose two.)

    Choose 2 answers

    Show the answer

    Correct answersD. Correct the validation failure and retry rotation before promoting the pending version.E. Keep AWSCURRENT on the existing version until the pending credentials pass validation.

    AWhy not this: Application failures after promotion are not a substitute for the rotation function's validation.

    BWhy not this: Promoting untested credentials bypasses the validation safeguard.

    CWhy not this: Updating the database password does not replace testing authentication and required access.

    DWhy this is right: Resolving the failure and retrying allows validation to succeed before promotion.

    EWhy this is right: AWSCURRENT should not move to the pending version until validation succeeds.

    The pending credentials must pass testSecret before finishSecret promotes them to AWSCURRENT. Correct the failure and retry the workflow; successful setSecret only establishes the database password and does not establish that the credentials work as required.

    Open this question
  30. Question 30

    Security and Compliance

    An IAM user must run CLI operations that require MFA while retaining the user's existing permissions without assuming a role. Which AWS STS operation should the user call with an MFA code?

    Show the answer

    Correct answerA. GetSessionToken

    AWhy this is right: GetSessionToken returns temporary credentials with MFA context while retaining the IAM user's permissions.

    BWhy not this: AssumeRoleWithSAML requires a SAML assertion and creates a role session.

    CWhy not this: GetFederationToken does not accept MFA parameters to create the required MFA-authenticated session.

    DWhy not this: AssumeRole requires a role and uses its permissions rather than simply retaining the user's permissions.

    GetSessionToken accepts an IAM user's MFA information and returns temporary credentials that retain the user's permissions with MFA context. AssumeRole creates a role session governed by the role's permissions instead.

    Open this question
  31. Question 31

    Security and Compliance

    An IAM execution role trusts the scheduler.amazonaws.com service principal so that EventBridge Scheduler can invoke targets. The security team must ensure the service can assume the role only for schedules in the account's Finance schedule group. What should the role's trust policy add?

    Show the answer

    Correct answerC. aws:SourceArn and aws:SourceAccount conditions matching the Finance schedule group and the account

    AWhy not this: An external ID is passed by a third party calling AssumeRole; a service principal assuming the role does not supply one.

    BWhy not this: Service principals do not belong to an organization, so this condition does not tie the request to the Finance schedule group.

    CWhy this is right: The service passes the schedule group ARN and account as request context, so the trust policy accepts only that group's schedules.

    DWhy not this: aws:CalledVia applies when a service makes a request using an IAM principal's credentials; it does not identify the schedule group behind a role assumption.

    When a service principal assumes a role on behalf of a resource, aws:SourceArn and aws:SourceAccount identify that resource and its account, which prevents the cross-service confused deputy problem. For EventBridge Scheduler, aws:SourceArn is the schedule group ARN.

    Open this question
  32. Question 32

    Security and Compliance

    Which service can automatically rotate a database password and store the updated credentials for applications to retrieve?

    Show the answer

    Correct answerC. AWS Secrets Manager

    AWhy not this: AWS STS issues temporary AWS credentials, not rotated database passwords.

    BWhy not this: Parameter Store can store encrypted passwords but requires a separately implemented password rotation workflow.

    CWhy this is right: Secrets Manager supports scheduled credential rotation and stores the updated secret.

    DWhy not this: IAM manages AWS identities and permissions, not automatic rotation of database passwords.

    AWS Secrets Manager supports scheduled rotation of database credentials and stores their updated values. Parameter Store can store passwords but does not provide equivalent built-in password rotation.

    Open this question
  33. Question 33

    Security and Compliance

    An application caches database credentials briefly, so previously retrieved credentials must remain usable while it refreshes after rotation. Its database supports cloned users, and the application must not receive administrative credentials; which Secrets Manager rotation design best meets these requirements?

    Show the answer

    Correct answerC. Use alternating-users rotation with administrative credentials stored in a separate secret.

    AWhy not this: AWSPREVIOUS retains the old secret value but does not keep the replaced database password valid.

    BWhy not this: Including administrative credentials in the application secret exposes privileges the application must not receive.

    CWhy this is right: Alternating users support overlapping credential validity, while a separate administrative secret isolates elevated access.

    DWhy not this: Single-user rotation changes the active user's password, and application access to administrator credentials violates the requirement.

    Alternating-users rotation updates the inactive user's credentials while the other user's credentials remain usable during the transition. A separate administrative secret supports rotation without exposing elevated credentials to the application. AWSPREVIOUS preserves a secret value, not its validity in the database.

    Open this question
  34. Question 34

    Security and Compliance

    An Application Load Balancer uses an imported ACM certificate, and the issuing corporate CA has supplied a renewed certificate with the same names. How should a pipeline deploy the renewal without changing the listener configuration?

    Show the answer

    Correct answerA. Reimport the renewed certificate into the existing ACM ARN.

    AWhy this is right: Reimporting preserves the certificate ARN and its existing service associations.

    BWhy not this: ACM does not provide managed renewal for imported certificates.

    CWhy not this: A listener trust store validates client certificates; it does not replace the server certificate.

    DWhy not this: A new import creates a different ARN, so the listener must be updated to use it.

    Reimporting the renewed certificate into the existing ACM ARN preserves the listener association. Importing it as a new resource creates a different ARN and requires updating the listener.

    Open this question
  35. Question 35

    Security and Compliance

    An S3 bucket contains existing objects encrypted with SSE-S3. A deployment enables default SSE-KMS encryption with a customer managed key; what additional action should automate migration of the existing objects?

    Show the answer

    Correct answerB. Use S3 Batch Operations to copy the objects with the required SSE-KMS settings.

    AWhy not this: Key rotation changes KMS key material, not the encryption method of existing SSE-S3 objects.

    BWhy this is right: Copying existing objects with SSE-KMS settings encrypts the resulting objects with the required key.

    CWhy not this: S3 Bucket Keys reduce KMS request costs; enabling them does not migrate existing SSE-S3 objects.

    DWhy not this: An upload policy can enforce future encryption requirements but cannot re-encrypt existing objects.

    Changing default encryption does not re-encrypt existing objects. S3 Batch Operations can copy them with the required SSE-KMS settings; a bucket policy governs requests but does not transform stored objects.

    Open this question
  36. Question 36

    Security and Compliance

    Internal ALBs need private server certificates that chain to a corporate root whose key must remain offline; clients already trust that root. Which design supports ACM-managed renewal without introducing another root or exporting server private keys?

    Show the answer

    Correct answerA. Sign an AWS Private CA subordinate with the corporate root, then request certificates through ACM with renewal permissions.

    AWhy this is right: The subordinate preserves corporate trust, and ACM can renew its private certificates without exporting server keys.

    BWhy not this: Directly issued certificates imported into ACM are not eligible for ACM-managed renewal.

    CWhy not this: A new private root introduces a different trust anchor that clients do not already trust.

    DWhy not this: Imported certificates do not receive ACM-managed renewal, regardless of permissions.

    A subordinate CA signed by the corporate root preserves the existing trust chain while ACM-issued private certificates support managed renewal with the required permissions. Certificates issued directly through AWS Private CA and then imported into ACM do not receive ACM-managed renewal.

    Open this question
  37. Question 37

    Security and Compliance

    A role in account B must read S3 objects owned by account A and encrypted with account A's customer managed KMS key. With no existing cross-account grants or explicit denies, which permissions must an infrastructure pipeline configure? (Choose three.)

    Choose 3 answers

    Show the answer

    Correct answersA. Allow the role s3:GetObject and kms:Decrypt on the relevant resources through its identity policy.C. Allow the role kms:Decrypt through account A's KMS key policy.E. Allow the role s3:GetObject on the objects through account A's bucket policy.

    AWhy this is right: The role's account must authorize both the object read and use of the external KMS key for decryption.

    BWhy not this: S3 buckets do not have security groups, and network access cannot replace S3 or KMS authorization.

    CWhy this is right: The key policy must authorize the external role to decrypt with account A's KMS key.

    DWhy not this: Generating data keys does not authorize decryption of existing encrypted objects.

    EWhy this is right: The bucket policy supplies account A's resource-side authorization for cross-account object reads.

    Cross-account reads require S3 authorization from both accounts and KMS authorization through the key policy and the role's identity policy. kms:GenerateDataKey supports encryption operations, not the decryption required to read these objects.

    Open this question
  38. Question 38

    Security and Compliance

    A company permits S3 bucket access between accounts in its AWS Organizations organization but must identify bucket policies granting access outside that organization, even before anyone uses the access. Which configuration best meets this requirement?

    Show the answer

    Correct answerC. An IAM Access Analyzer external access analyzer with the organization as its zone of trust

    AWhy not this: A configuration aggregator centralizes configuration data but does not itself analyze policies for external access.

    BWhy not this: An account trust boundary also treats other accounts in the same organization as external.

    CWhy this is right: The organization trust boundary distinguishes permitted internal sharing from access granted to outside principals.

    DWhy not this: S3 Protection detects suspicious access activity rather than identifying unused permissions in bucket policies.

    An organization-level external access analyzer treats the organization as its zone of trust and identifies supported policies granting access outside it without requiring access activity. An account-level analyzer also flags access granted to other organization accounts, which is permitted here.

    Open this question
  39. Question 39

    Security and Compliance

    A company stores container images in Amazon ECR. It needs findings for vulnerable operating system and language packages, updated when new vulnerabilities are discovered. Which solution should it use?

    Show the answer

    Correct answerC. Amazon ECR enhanced scanning with continuous scanning

    AWhy not this: AWS Config evaluates resource configurations against rules rather than scanning container packages for vulnerabilities.

    BWhy not this: External access analysis identifies resource policies that allow access from outside a trust boundary, not vulnerable packages.

    CWhy this is right: Enhanced scanning uses Amazon Inspector, and continuous scanning updates vulnerability findings for eligible images.

    DWhy not this: EKS Protection detects suspicious Kubernetes audit activity, not vulnerabilities in stored container image packages.

    Amazon ECR enhanced scanning uses Amazon Inspector to identify operating system and language package vulnerabilities; continuous scanning updates findings as new vulnerabilities emerge. GuardDuty EKS Protection identifies suspicious Kubernetes activity rather than vulnerable packages.

    Open this question
  40. Question 40

    Security and Compliance

    An S3 bucket contains confidential objects encrypted with SSE-KMS, but its policy permits authorized clients to retrieve them over HTTP. Which change directly addresses the remaining data exposure risk?

    Show the answer

    Correct answerB. Deny requests when aws:SecureTransport is false

    AWhy not this: Block Public Access restricts public sharing but does not enforce HTTPS for authorized clients.

    BWhy this is right: The policy condition rejects requests that do not use secure transport.

    CWhy not this: KMS key rotation changes encryption key material but does not protect HTTP transfers.

    DWhy not this: Versioning preserves object versions but does not encrypt network traffic.

    Denying requests when aws:SecureTransport is false prevents unencrypted HTTP access. SSE-KMS protects stored objects, not their transport; S3 Block Public Access restricts public access but does not require authorized clients to use HTTPS.

    Open this question
  41. Question 41

    Security and Compliance

    An active IAM access key and its secret appear in a public repository. What is the primary security risk?

    Show the answer

    Correct answerC. An attacker can make requests with the IAM user's permissions

    AWhy not this: Authenticated requests remain subject to applicable bucket policies and other authorization controls.

    BWhy not this: Role assumption requires authorization and a compatible role trust policy.

    CWhy this is right: The access key pair can authenticate AWS requests under the associated IAM user's permissions.

    DWhy not this: KMS decryption requires authorization; possessing an access key does not grant access to every KMS key.

    An exposed access key pair lets an attacker authenticate requests as the IAM user, subject to applicable permissions and controls. It does not automatically grant permission to assume arbitrary roles.

    Open this question
  42. Question 42

    Security and Compliance

    A company stores proprietary customer reference numbers in S3 documents. The numbers follow an internal pattern and should be classified as sensitive only when nearby text contains “customer reference.” What should the engineer configure?

    Show the answer

    Correct answerD. A Macie custom data identifier with a keyword proximity setting

    AWhy not this: Object-tag compliance does not inspect document contents for patterns and nearby keywords.

    BWhy not this: Managed data identifiers detect predefined sensitive data types; severity changes do not define a proprietary matching pattern.

    CWhy not this: An allow list excludes matching text from sensitive data findings rather than classifying it as sensitive.

    DWhy this is right: A custom identifier can match the internal pattern and require the specified keyword within a configured distance.

    A Macie custom data identifier combines a regular expression with optional keywords and a maximum match distance to recognize proprietary sensitive data. An allow list suppresses matching text from findings rather than defining a sensitive data type.

    Open this question
  43. Question 43

    Security and Compliance

    A company must inspect every new or changed supported S3 object in buckets tagged DataClass=Regulated each week, including buckets that receive this tag later, without maintaining a bucket list. Which Amazon Macie configuration meets this requirement?

    Show the answer

    Correct answerA. A weekly classification job with tag-based bucket criteria and a 100% sampling depth

    AWhy this is right: Bucket criteria are re-evaluated at each run, so newly tagged buckets are included, and each run analyzes every new or changed eligible object at 100% depth.

    BWhy not this: A one-time job runs once, so it does not inspect objects that are created or changed in later weeks.

    CWhy not this: Automated discovery samples objects across buckets rather than analyzing every new or changed object each week.

    DWhy not this: An explicit bucket list does not automatically add buckets that receive the required tag later.

    A weekly job with tag-based bucket criteria re-evaluates which buckets match at each run, and each run analyzes all objects created or changed since the previous run at 100% sampling depth. An explicit bucket list would miss newly tagged buckets, and automated sensitive data discovery only samples objects.

    Open this question
  44. Question 44

    Security and Compliance

    A company must restrict database connections to instances associated with its application security group and independently detect suspicious AWS API activity. Which combination BEST provides these preventive and detective controls?

    Show the answer

    Correct answerA. Security-group source references and Amazon GuardDuty

    AWhy this is right: Security-group references enforce the access boundary, and GuardDuty independently detects suspicious API activity.

    BWhy not this: Network ACLs cannot reference security groups, and AWS Config does not provide threat detection for API activity.

    CWhy not this: Security-group references provide access control, but AWS Config evaluates configuration compliance rather than suspicious API behavior.

    DWhy not this: Network ACLs filter by IP address ranges, not by application security-group membership.

    Security-group references restrict database access by application security-group membership, while GuardDuty detects suspicious activity using sources that include CloudTrail management events. AWS Config evaluates resource configurations rather than detecting malicious API behavior.

    Open this question
  45. Question 45

    Security and Compliance

    An S3 bucket contains objects encrypted with the AWS managed KMS key aws/s3. A role in another AWS account has S3 read permission but must read these objects directly without assuming a role in the bucket account; which solution meets this requirement?

    Show the answer

    Correct answerB. Re-encrypt the objects with a customer managed KMS key and authorize the external role in both accounts.

    AWhy not this: Default encryption affects new writes and does not re-encrypt existing objects.

    BWhy this is right: A customer managed key supports cross-account authorization, and re-encryption replaces the existing objects' inaccessible key.

    CWhy not this: An external IAM permission alone cannot enable cross-account use of the AWS managed aws/s3 key.

    DWhy not this: AWS managed key policies cannot be edited to authorize an external account.

    Cross-account access to SSE-KMS objects requires a customer managed key, with authorization in its key policy and the external role's IAM policy. The existing objects must be re-encrypted; changing bucket default encryption does not change their encryption keys.

    Open this question
  46. Question 46

    Security and Compliance

    An application runs behind Application Load Balancers in us-east-1 and eu-west-1. Both HTTPS listeners need a publicly trusted certificate for app.example.com that AWS renews automatically. Which approach meets these requirements?

    Show the answer

    Correct answerD. Request a public ACM certificate in each Region and attach each to the listener in its own Region.

    AWhy not this: A load balancer can use only an ACM certificate from its own Region; the us-east-1 exception applies to CloudFront.

    BWhy not this: Load balancer listeners use certificates from ACM or IAM, not Secrets Manager, and a stored certificate is not renewed automatically.

    CWhy not this: Private CA certificates are not publicly trusted, so public clients would reject them.

    DWhy this is right: Each Region gets its own public ACM certificate, which its load balancer can use and ACM renews automatically.

    ACM certificates are Regional: a load balancer can use only a certificate in its own Region, so request one public certificate per Region, and ACM renews each automatically. A single us-east-1 certificate serves CloudFront, not load balancers in other Regions.

    Open this question
  47. Question 47

    Security and Compliance

    An application on Amazon EC2 writes authentication failures to a local text file. A DevOps engineer must make these records searchable in CloudWatch Logs. Which action meets this requirement?

    Show the answer

    Correct answerB. Configure the unified CloudWatch agent to collect the file with appropriate IAM permissions.

    AWhy not this: CloudTrail management events describe AWS control plane activity, not the contents of local application log files.

    BWhy this is right: The agent collects configured local files and uses IAM permissions to publish their records to CloudWatch Logs.

    CWhy not this: Detailed monitoring provides more frequent EC2 metrics; it does not collect application log files.

    DWhy not this: VPC Flow Logs describe network flows, not application authentication messages.

    The unified CloudWatch agent can collect application log files and publish them to CloudWatch Logs. CloudTrail records supported AWS API activity, not arbitrary files written by an application.

    Open this question
  48. Question 48

    Security and Compliance

    A company must record S3 object write API activity only under the confidential/ prefix of one bucket, while excluding reads and other prefixes to control logging costs. Which configuration BEST meets these requirements?

    Show the answer

    Correct answerD. Use CloudTrail advanced event selectors for S3 objects, the object ARN prefix, and readOnly=false.

    AWhy not this: Object-level API activity requires data events, not management events.

    BWhy not this: Server access logs are a different logging mechanism, and filtering after delivery does not restrict collection to the required prefix.

    CWhy not this: Downstream filtering still records reads and unrelated prefixes, increasing unnecessary data-event charges.

    DWhy this is right: Resource type, ARN prefix, and readOnly filters restrict collection to the required object write activity.

    Advanced event selectors can restrict S3 data-event collection by resource ARN prefix and readOnly status. Filtering all bucket data events downstream does not avoid recording the unwanted events or their associated collection costs.

    Open this question
  49. Question 49

    Security and Compliance

    An investigator finds an unauthorized API call made with an assumed role in a target account; multiple callers used identical role session names, and source identity was not configured. With complete CloudTrail records from both accounts, which correlation BEST identifies the principal that obtained the credentials used for that call?

    Show the answer

    Correct answerA. Match userIdentity.accessKeyId to responseElements.credentials.accessKeyId in a successful AssumeRole event, then inspect that event's caller.

    AWhy this is right: Matching the temporary access key links the API call to the credential-issuing event and its recorded caller.

    BWhy not this: Shared addresses and unrelated console sessions make IP and time correlation insufficient for this attribution.

    CWhy not this: Identical session names can represent different credential sets and different callers.

    DWhy not this: The role creator is not necessarily the principal that later assumed the role.

    The temporary access key identifies the credential set used for the API call and can be matched to the successful AssumeRole response. Session names can be reused, so matching a name alone cannot distinguish these sessions.

    Open this question
  50. Question 50

    Security and Compliance

    Application logs in CloudWatch Logs contain structured fields named outcome and sourceIp. An analyst must identify the source addresses with the most failed sign-ins during the previous hour. What should the analyst do?

    Show the answer

    Correct answerB. Use Logs Insights to filter failures, count by sourceIp, and sort by count descending.

    AWhy not this: CloudTrail console sign-in events do not represent this application's authentication records.

    BWhy this is right: Filtering, grouping, and sorting stored records produces the required ranking for the previous hour.

    CWhy not this: Live Tail observes incoming records rather than aggregating the complete previous hour.

    DWhy not this: A single failure-count metric loses the source-address breakdown needed for ranking.

    CloudWatch Logs Insights can filter stored application records and aggregate failures by source address over a selected time range. A single aggregate metric counts failures but does not rank their source addresses.

    Open this question