Lesson 2 of 6 Amazon S3

Securing and Encrypting S3 Data

This lesson explains how S3 security combines identity policies, bucket policies, Block Public Access and encryption.

Learning outcomes

After completing this lesson, you will be able to:

  • Explain how Block Public Access, bucket policies and access points combine.
  • Choose an encryption option.
  • Describe how a data perimeter is enforced and access is monitored.

Access controls

Several controls work together to decide who can reach S3 data. Block Public Access overrides any bucket policy or ACL that would make data public. It is on by default for new buckets and can be enforced for a whole account, so a mistaken policy cannot expose data. Object Ownership set to bucket owner enforced, the default for new buckets, disables ACLs entirely, so access is decided by policies alone, which are easier to audit.

Bucket policies grant access to other accounts and enforce rules, such as requiring TLS with aws:SecureTransport, requiring requests through a particular VPC endpoint with aws:SourceVpce, allowing only principals in your organisation with aws:PrincipalOrgID, or requiring encryption headers. S3 Access Points give each application its own host name and policy for a shared bucket, optionally reachable only from a VPC, which avoids one very large bucket policy. Presigned URLs give temporary access to one object for upload or download to someone without AWS credentials. The following table summarises the controls.

ControlPurpose
Block Public AccessOn by default per bucket, settable per account; overrides any public policy or ACL
Object Ownership: bucket owner enforcedDefault for new buckets; disables ACLs so policies alone control access
Bucket policiesCross-account access and rules: require TLS (aws:SecureTransport), a VPC endpoint (aws:SourceVpce), your organisation (aws:PrincipalOrgID), encryption headers
S3 Access PointsPer-application host name and policy, optionally VPC-only
Presigned URLsTemporary access to one object for upload or download

The following diagram shows the controls a request meets on its way to the data.

The controls a request to S3 meets. Block Public Access overrides any policy or ACL that would make data public. With Object Ownership set to bucket owner enforced, ACLs are disabled, so policies alone decide access. The bucket policy, or an access point's own policy, enforces conditions such as TLS, a specific VPC endpoint or principals in the organisation.
Block Public Access sits above every policy, so even a mistaken bucket policy cannot make data public.
Match the pairs

S3 access controls

Exam skills 1.3.6 · 1.2.3

Match each requirement with the S3 control that meets it.

Log in to try this activity Interactive activities are free with an account.

Encryption at rest

S3 encrypts every new object, and the options differ in who manages the keys. SSE-S3 is the default, with keys managed entirely by S3. SSE-KMS uses a KMS key, so the key policy decides who can decrypt, and every use of the key is logged in CloudTrail, which is the usual answer when a requirement mentions key control or an audit trail. Because each object operation calls KMS, high request rates can reach KMS quotas; S3 Bucket Keys reduce those calls greatly. DSSE-KMS applies two layers of encryption for rules that require dual-layer encryption.

With SSE-C, the client sends its own key with every request; S3 uses it and discards it, so losing the key means losing the data; since April 2026, new buckets block SSE-C requests by default. With client-side encryption, the application encrypts data before uploading, so S3 never sees plaintext. The following table summarises the options.

OptionKeysNotes
SSE-S3Managed by S3 (AES-256)Default for all new objects
SSE-KMSKMS keysAudit trail and key policies; S3 Bucket Keys cut KMS calls
DSSE-KMSKMS, two layersDual-layer requirements
SSE-CYou supply the key per requestS3 does not store the key; blocked by default on new buckets
Client-sideYoursEncrypted before upload

HTTPS endpoints protect data in transit. Bucket policies can deny uploads without SSE-KMS (or a particular key) and requests where aws:SecureTransport is false; default encryption applies SSE-KMS automatically.

Sort into groups

Which S3 encryption?

Exam skills 1.3.2

Choose the S3 encryption option for each requirement.

Log in to try this activity Interactive activities are free with an account.

Data perimeter and monitoring

A data perimeter ensures that data can be reached only by trusted identities, from expected networks. Bucket policies with the aws:PrincipalOrgID condition allow only identities from the organisation, VPC endpoint conditions allow access only from the organisation's networks, and resource control policies apply these rules across all accounts. Together, they mean that leaked credentials cannot be used from outside the organisation's networks.

Monitoring confirms that access stays as intended: CloudTrail data events and S3 server access logs record who accessed which objects, Amazon Macie finds sensitive data in buckets, and IAM Access Analyzer for S3 reports buckets shared publicly or with other accounts.

Worked example

Locking down a sensitive bucket

A bucket holding sensitive data must meet several security requirements. The following table identifies the control that meets each.

RequirementControl
Never public, even by mistakeS3 Block Public Access at account and bucket level
Access only from the company's VPCBucket policy denying requests unless aws:SourceVpce is the VPC endpoint
Encrypted with a key the company controls and auditsDefault encryption with SSE-KMS and a customer managed key
HTTPS onlyBucket policy denying aws:SecureTransport = false
No ACLsObject Ownership: bucket owner enforced

Each control addresses a different risk, and the explicit deny statements in the bucket policy apply to every principal, so even an administrator cannot accidentally weaken them without changing the policy itself.

Check yourself

What is the difference between SSE-S3 and SSE-KMS?

Show answer

Both encrypt objects at rest. SSE-KMS uses a KMS key, so access to the key can be controlled and audited in CloudTrail; SSE-S3 uses keys that S3 manages.

Exam Tips

Remember for the exam

  • To prevent any public exposure across the account, use account-level Block Public Access.
  • For a temporary upload or download link for a user without AWS credentials, use a presigned URL.
  • To audit who used the encryption key, use SSE-KMS.
  • When many applications share one bucket with different permissions, use S3 Access Points.
  • To allow only principals in your organisation to access a bucket, use an aws:PrincipalOrgID condition.
  • To reject unencrypted HTTP requests, deny requests in which aws:SecureTransport is false.