A company needs to enforce account-wide encryption and prevent accidental unencrypted uploads for an S3 data lake. Which combination best satisfies this while allowing legitimate exceptions for specific prefixes?

Answer

Use a bucket policy with Deny on s3:PutObject if s3:x-amz-server-side-encryption is missing, plus a separate Allow statement scoped to a prefix using s3:ExistingObjectTag

Explanation

A resource policy can deny requests lacking required encryption headers while still permitting scoped exceptions via additional statements. Post-facto detection does not prevent noncompliant writes, and SCPs cannot directly inspect object encryption headers for each request.

Last reviewed: October 2026

Reviewed by FirstInTest Editorial Team

Report an error

Related questions

A data platform streams click events into S3 via Kinesis Data Firehose, and analytics jobs read using Athena. The team needs to ensure new partitions become queryable quickly while avoiding partial data files during schema evolution. What is the best approach?

View question →

A company uses Aurora PostgreSQL Serverless v2 for a spiky workload. They observe that after traffic drops, connections remain open longer than expected and the autoscaling doesn’t reduce capacity quickly. What is the most likely cause and best remedy?

View question →

A solution uses DynamoDB with Global Tables across multiple regions. A requirement states: reads must always reflect writes from the local region immediately, but global eventual consistency can lag. Which setup best satisfies this?

View question →

A migration from self-managed Kafka to Amazon MSK fails intermittently due to consumer group rebalances taking too long. The consumers must not lose ordering for keys but can tolerate duplicates. What is the best configuration strategy?

View question →

An AWS AppSync GraphQL API backs a fleet of mobile clients. You need deterministic ordering of events consumed by downstream systems, but you cannot block ingestion while ordering is enforced. Which architecture best satisfies this?

View question →

You are designing a multi-account AWS landing zone. A security team wants consistent tagging and automated controls for new accounts, but developers must be able to deploy resources before a tagging pipeline completes. Which approach best meets the requirement?

View question →

QuestionBack to list