Design Secure Architectures

Review questions

Module summary: Design Secure Architectures

For cross-account access, locate the first failed request. AssumeRole requires source permission and target trust; the temporary session then needs the requested action on the correct resource ARN. An SCP is a ceiling, not a grant. Valid trust cannot repair a wrong object ARN or missing KMS authorization. Test an in-scope object, an out-of-scope object, and a denied write so one successful request does not masquerade as proof of least privilege.

In networking, separate client-to-ALB, ALB-to-app, and app-to-database flows. For each hop identify the initiator, port, route, and target security group. An S3 gateway endpoint supplies a private path through associated route tables but does not replace IAM, bucket, or endpoint authorization. Place WAF at a suitable HTTP entry point and retain application-level validation and authorization.

For data protection, combine encryption with permission to use the key and evidence that restore works. Copying ciphertext across accounts does not prove the recovery role can decrypt it. Restore a chosen version, verify contents, measure its age, and compare with the data-loss objective. Logical deletion or corruption may replicate to another location, so protected versions or independent restore points may be needed. A different KMS key, explicit Deny, or evidenced retention requirement changes the decision; fictional case inputs are not a general legal rule.

The smallest repair assigns `AuditReaders` to `AuditView` in production, verifies provisioning there, and tests one intended read and one write that must be denied. A counterfactual changes the repair: suppose the assignment and role exist, but a custom managed policy referenced by the permission set is missing at the exact name and path in production. Run a staged paper experiment. The counterfactual matters. The solution first isolates the faulty writer so that more misleading versions are not created. The counterfactual changes the answer.

Review questions

Test your understanding with these questions. Marking and saved results are available with a free account.

  1. Question 1An analyst role in account A may call sts:AssumeRole on a reports role in account B. The reports role allows s3:GetObject on the correct report prefix, but its trust policy names an old role rather than the analyst role. What first change addresses the failure?
  2. Question 2In an AWS Organizations member account, a role IAM policy allows s3:GetObject on a specified object, but an applicable SCP explicitly denies the same action. What is the request result under these facts?
  3. Question 3An analyst successfully assumes ReadReports across two member accounts and can list the 2026/ prefix of an S3 bucket, but GetObject on an object inside it is denied. The case supplies no Deny or customer managed KMS encryption. The role policy names only ListBucket on the bucket ARN. Which correction is most precise?
  4. Question 4The target role trusts an analyst and has GetObject, but the source identity lacks AssumeRole permission. What is the first repair?
  5. Question 5Containers in two private subnets read S3. An S3 gateway endpoint is associated with only one subnet route table, and no NAT exists. Which change gives the second subnet an S3 path without opening internet egress?
  6. Question 6Why does allowing inbound 5432 in a database security group not by itself prove application connectivity from another subnet?
  7. Question 7A public HTTPS service needs web request protection, while clients never need direct database access. Which boundary design fits?
  8. Question 8After S3 traffic moves through a gateway endpoint, connectivity works but a bucket policy conditioned on the old public aws:SourceIp denies the requests. Which condition preserves a restriction on the client's VPC IP?
  9. Question 9A role from account B can GetObject an SSE-KMS object in A, but the KMS key policy does not allow the role to use the key. What must change before retesting?
  10. Question 10What does restoring an older report copy into an isolated location demonstrate?
  11. Question 11A review job uses a path other than the VPC endpoint required by an explicit Deny in an S3 bucket policy. IAM and KMS allow the read. What best explains the denial?
  12. Question 12An encrypted backup copy exists cross-account, but the source key denies the destination account decrypt. What is missing from the restore proof?
  13. Question 13An auditor sees the AuditView permission set in IAM Identity Center but only the test account appears in the portal. What is the first repair location?
  14. Question 14A permission set containing a customer managed IAM policy is assigned to a second account, but provisioning fails because that policy is absent there. What is the targeted action?
  15. Question 15An auditor role is provisioned in a member account, but an applicable SCP explicitly denies the required read. Which change addresses the denial source?
  16. Question 16Public traffic now enters through a CloudFront distribution, while the existing AWS WAF protection is attached only to the origin ALB. The team wants request inspection at the distribution before origin access. Which protection configuration fits?
  17. Question 17A trial WAF rule matches both an injection request and a legitimate checkout name containing a quote. What should happen before blocking?
  18. Question 18A web ACL protects the ALB, but the database still accepts direct internet connections. What gap remains?
  19. Question 19An operator adds a delete marker above an S3 version protected by Object Lock during retention. What follows?
  20. Question 20An organization will replicate locked objects to a second bucket. Which Object Lock design condition matters?
  21. Question 21An encrypted invoice version reached the recovery Region, but the KMS key policy denies the recovery team decrypt. What is the verdict?