Sub topic 2
Regions, Durability, Access, and Sharing in Amazon S3
Assume you know basic command-line usage, HTTP, AWS accounts, IAM, and Python reading. This chapter focuses on how S3 reaches data and controls access.
Regions, durability, and availability
An S3 bucket belongs to one AWS Region, such as eu-west-1. Choose a Region near users or applications to reduce network latency and data-transfer cost. Regional placement can also support legal or regulatory requirements.
S3 stores objects redundantly across multiple Availability Zones within a Region. Amazon S3 Standard is designed for 99.999999999% annual durability, often called “eleven nines.” Durability means the probability that stored data is lost. Availability means how often the service can answer requests. These are different properties.
A Region failure can still affect access. If an application needs protection from a Region-wide outage, configure replication to another Region and design the application to use the replica.
Consistency after a write
S3 provides strong read-after-write consistency. After a successful upload, overwrite, or delete, subsequent GET, HEAD, and LIST requests reflect the change. You do not need application-level delay loops to wait for ordinary visibility.
Consistency does not guarantee that a request will succeed. IAM policy errors, network failures, throttling, and an unavailable dependency can still prevent access.
Controlling access
IAM policies grant permissions to identities such as roles and users. A bucket policy grants or denies access at the bucket resource and can apply to other accounts. An explicit Deny overrides an Allow.
Block Public Access adds safeguards that prevent common public ACL and public-policy configurations. Keep all four settings enabled unless you have a reviewed, specific reason to change them.
Encrypting data
S3 encrypts new objects at rest by default with SSE-S3. Use SSE-KMS when you need customer-managed keys, key policies, or audit records in AWS CloudTrail. Data in transit should use HTTPS. A bucket policy can deny requests where aws:SecureTransport is false.
Sharing private objects temporarily
A presigned URL is a time-limited URL signed with permissions held by the creator. Anyone who obtains the URL can use it until it expires, so keep its lifetime short and avoid putting it in logs.
import boto3
s3 = boto3.client("s3")
url = s3.generate_presigned_url(
"get_object",
Params={
"Bucket": "my-example-bucket-123456789012",
"Key": "reports/2026/report.csv",
},
ExpiresIn=900,
)
print(url)Exercise
An object upload succeeds, but a later GET returns AccessDenied. Does this indicate an S3 consistency delay?
Show answer
No. S3 has strong consistency. Check the caller's IAM permissions, the bucket policy, Block Public Access settings, and the object key.