Courseiva
Design for New Solutions →mediumMultiple Select

Two Actions to Improve S3 Bucket Security

Which TWO actions will improve the security posture of an Amazon S3 bucket used to store sensitive data? (Choose two.)

Quick Answer

The answer is enabling S3 Block Public Access and configuring a bucket policy that denies access unless the request originates from a specific VPC or IP range. These two actions directly enforce network-level and account-level restrictions, preventing unauthorized access at the bucket’s perimeter. S3 Block Public Access acts as a centralized override that blocks all public access policies, while a condition key like aws:SourceIp in the bucket policy ensures only traffic from trusted IPs or VPC endpoints can reach the data. On the AWS Certified Solutions Architect Professional SAP-C02 exam, this pairing tests your understanding of defense-in-depth for sensitive data—a common trap is confusing encryption or logging with access control, which do not block unauthorized requests. Remember the memory tip: “Block first, then lock the IP” to recall that S3 Block Public Access is the global kill switch, and the bucket policy is the granular gatekeeper.

⚠ Common exam trap

A common mix-up: candidates confuse data protection features like Versioning and encryption with access control mechanisms, leading them to select options that protect data integrity or confidentiality at rest but do not prevent unauthorized access or exposure.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Enable S3 Block Public Access settings at the account or bucket level.

Option B is correct because S3 Block Public Access provides a centralized set of controls (BlockPublicAcls, IgnorePublicAcls, BlockPublicPolicy, RestrictPublicBuckets) that override bucket policies and ACLs to prevent unintended public exposure of sensitive data, which is a foundational S3 security measure. Option E is correct because a bucket policy with a Deny effect conditioned on aws:SourceVpc or aws:SourceIp (using the IpAddress/NotIpAddress condition keys) enforces network-level least privilege, ensuring only requests from trusted networks can access the objects. Option A is not a security control — S3 Versioning only preserves object versions for recovery and does not restrict access or exposure. Option C is helpful for data-at-rest protection but SSE-S3 is the baseline AWS-managed encryption already applied by default to all new objects, so it does not materially improve posture versus SSE-KMS or bucket keys. Option D is a detective/monitoring control that records access requests but does not prevent unauthorized access, so it does not directly improve the security posture.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Enable S3 Versioning on the bucket.

    Why it's wrong here

    Versioning preserves prior object versions, so it protects against overwrite and deletion, not against unauthorised access or exposure of sensitive data. It is tempting because it supports recovery, and it would be correct where the requirement is retaining object history or recovering from accidental deletion.

  • ✓

    Enable S3 Block Public Access settings at the account or bucket level.

    Why this is correct

    S3 Block Public Access overrides bucket policies and ACLs that would otherwise grant public access, providing an account- or bucket-level guardrail. This directly prevents accidental exposure of sensitive objects, satisfying the requirement to improve the bucket's security posture.

  • ✗

    Enable default encryption using SSE-S3.

    Why it's wrong here

    SSE-S3 encrypts objects at rest with AWS-managed keys, but the stem asks for security-posture improvements, and SSE-S3 is already the default baseline with no customer-controlled key policy. SSE-KMS is correct when the requirement is key control, rotation, or audit trails via AWS CloudTrail.

  • ✗

    Enable S3 server access logging for the bucket.

    Why it's wrong here

    Server access logging records requests after they occur; it provides audit evidence rather than preventing access, so it does not itself tighten the bucket's security posture. It is tempting because logging is a detective control, and it would be correct where the requirement is tracing who accessed objects.

  • ✓

    Configure a bucket policy that denies access unless the request originates from a specific VPC or IP range.

    Why this is correct

    A bucket policy with a Deny condition on aws:SourceVpc or aws:SourceIp restricts access to requests from approved networks. This enforces network-origin constraints on sensitive data, denying all other principals even if they hold valid credentials.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

Courseiva writes every SAP-C02 question from scratch — 984 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on SAP-C02

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Which TWO actions improve the security of an Amazon S3 bucket that stores sensitive data?

medium
  • A.Enable CORS (Cross-Origin Resource Sharing).
  • ✓ B.Enable S3 server access logging.
  • ✓ C.Enable S3 Block Public Access.
  • D.Enable S3 Transfer Acceleration.
  • E.Use a bucket policy that denies access to all principals except the root user.

Why B: Enabling S3 Block Public Access (Option C) is a critical security control that prevents any public access to the bucket, regardless of bucket policies or object ACLs, effectively eliminating the risk of unintended data exposure. Enabling S3 server access logging (Option B) records all requests made to the bucket, providing an audit trail that can be used to detect unauthorized access attempts, troubleshoot security events, and meet compliance requirements. Both actions directly enhance the security posture of a bucket storing sensitive data.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SAP-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SAP-C02 exam.