Overview
AWS S3 (Amazon Simple Storage Service) is a cloud-based object storage service designed for scalability, data availability, security, and performance. Launched in 2006, S3 was one of the foundational services of Amazon Web Services, providing a simple web service interface that can be used to store and retrieve any amount of data, at any time, from anywhere on the web. It operates on a pay-as-you-go model, with tiered pricing based on storage class, data transfer, and request volume, making it adaptable for various budgets and use cases.
S3 is suitable for a broad spectrum of applications, from hosting static websites and backing up critical data to supporting big data analytics and content distribution. Its architecture is designed for 99.999999999% (11 nines) of durability, achieved through storing data redundantly across multiple devices in multiple facilities within an AWS Region. This high durability, combined with features like versioning and replication, helps protect against accidental deletions and data loss.
The service offers multiple storage classes, each optimized for specific data access patterns and cost requirements. For instance, S3 Standard is for frequently accessed data, while S3 Glacier Deep Archive is designed for long-term data archival at the lowest cost. S3 Intelligent-Tiering automatically moves data between access tiers based on changing access patterns, helping to optimize storage costs without operational overhead. This flexibility allows developers and organizations to align storage costs with actual data usage and retrieval needs.
AWS S3 integrates with other AWS services, such as Amazon CloudFront for content delivery, AWS Lambda for serverless data processing, and Amazon Athena for querying data directly in S3 using standard SQL. This ecosystem integration facilitates the construction of complex, scalable cloud architectures. While the extensive feature set and integration options provide significant power, new users may find the breadth of choices and configuration options to require a learning curve, as noted in the developer experience documentation.
Key features
- Object Storage: Stores data as objects within buckets, supporting files of virtually any type and size, up to 5 TB per object.
- Storage Classes: Offers various classes (Standard, Intelligent-Tiering, Standard-IA, One Zone-IA, Glacier Instant Retrieval, Glacier Flexible Retrieval, Glacier Deep Archive) optimized for different access frequencies and cost profiles.
- Data Durability and Availability: Engineered for 99.999999999% data durability and high availability, replicating data across multiple facilities.
- Security and Compliance: Provides robust security features including encryption at rest and in transit, access control policies (IAM, bucket policies), and supports numerous compliance standards such as HIPAA, PCI DSS Level 1, and GDPR, as detailed in the AWS S3 security and compliance overview.
- Static Website Hosting: Allows direct hosting of static websites from S3 buckets, serving content directly to users globally.
- Lifecycle Management: Automates the movement of objects between storage classes or deletion after a specified period, optimizing costs.
- Versioning: Preserves multiple versions of an object, providing a means to recover from accidental deletions or overwrites.
- Replication: Supports S3 Cross-Region Replication (CRR) and Same-Region Replication (SRR) for automatic, asynchronous copying of objects across buckets.
- Event Notifications: Configures notifications for events like object creation or deletion, integrating with services like AWS Lambda or Amazon SNS.
- Data Transfer Acceleration: Speeds up data transfers to and from S3 buckets over long distances using optimized network paths.
Pricing
AWS S3 pricing is structured around several components: storage consumed, data transfer out, requests made, and additional features like S3 Object Lambda or S3 Batch Operations. The cost varies significantly depending on the chosen storage class, which is optimized for different access patterns and retrieval times. A free tier is available for new AWS customers, providing 5 GB of Standard Storage, 20,000 Get Requests, and 2,000 Put Requests per month for 12 months.
As of June 2026, the starting paid tier for S3 Standard storage in the US East (N. Virginia) region begins at $0.023 per GB per month. Prices decrease with higher storage volumes. Data transfer out of AWS regions generally incurs charges, while data transfer into S3 is typically free. For a comprehensive breakdown of current pricing, refer to the official AWS S3 pricing page.
| Component | Pricing Model (as of June 2026) | Notes |
|---|---|---|
| Storage | Per GB per month, tiered by storage class | S3 Standard: $0.023/GB (first 50 TB/month in US East) |
| Requests | Per 1,000 requests (GET, PUT, LIST, etc.) | Varies by request type and storage class; e.g., S3 Standard PUT requests: $0.005/1,000 |
| Data Transfer Out | Per GB, tiered | First 1 GB/month free; then $0.09/GB (up to 9.999 TB/month to internet in US East) |
| Data Transfer In | Generally free | Free when transferring data into S3 from the internet |
| Retrieval (Glacier classes) | Per GB retrieved, billed additionally to requests | Varies by Glacier class and retrieval option (expedited, standard, bulk) |
Common integrations
- AWS CloudFront: For content delivery and caching, improving global access speed for data stored in S3. Refer to CloudFront Developer Guide.
- AWS Lambda: To trigger serverless functions in response to S3 object events (e.g., object creation, deletion). See Lambda S3 integration documentation.
- Amazon Athena: For querying data stored directly in S3 using standard SQL, without loading it into a database. More details in the Athena Getting Started Guide.
- AWS Glue: For ETL (Extract, Transform, Load) operations on data stored in S3, preparing it for analytics. Consult AWS Glue ETL with S3.
- Amazon Redshift: For data warehousing, with the ability to load data from S3 for analytical processing. Learn more about loading data from S3 to Redshift.
- Amazon EMR: To run big data frameworks like Apache Spark and Hadoop on data residing in S3. The EMR S3 integration guide provides details.
Alternatives
- Google Cloud Storage: Google's object storage service, offering similar storage classes and global reach, often competing on pricing and regional availability.
- Azure Blob Storage: Microsoft's object storage solution, deeply integrated with the Azure ecosystem, providing various tiers for hot, cool, and archive data.
- Cloudflare R2: An object storage service that positions itself as a zero-egress fee alternative, designed to reduce data transfer costs.
- DigitalOcean Spaces: An S3-compatible object storage service, known for its simpler interface and predictable pricing, often favored by developers seeking ease of use.
- IBM Cloud Object Storage: Offers hybrid cloud capabilities and robust security features, with various storage classes and deployment options.
Getting started
To interact with AWS S3 programmatically, you typically use one of the AWS SDKs. The following Python example demonstrates how to upload a file to an S3 bucket and then list the objects in that bucket using the boto3 SDK. This requires that you have AWS credentials configured in your environment.
import boto3
from botocore.exceptions import ClientError
def upload_file_to_s3(file_name, bucket_name, object_name=None):
"""Upload a file to an S3 bucket
:param file_name: File to upload
:param bucket_name: S3 bucket to upload to
:param object_name: S3 object name. If not specified then file_name is used
:return: True if file was uploaded, else False
"""
if object_name is None:
object_name = file_name
s3_client = boto3.client('s3')
try:
s3_client.upload_file(file_name, bucket_name, object_name)
print(f"File {file_name} uploaded to {bucket_name}/{object_name}")
except ClientError as e:
print(f"Error uploading file: {e}")
return False
return True
def list_s3_objects(bucket_name):
"""List objects in an S3 bucket
:param bucket_name: S3 bucket to list objects from
:return: List of object keys, else None
"""
s3_client = boto3.client('s3')
try:
response = s3_client.list_objects_v2(Bucket=bucket_name)
if 'Contents' in response:
print(f"Objects in bucket {bucket_name}:")
for obj in response['Contents']:
print(f" - {obj['Key']}")
return [obj['Key'] for obj in response['Contents']]
else:
print(f"No objects found in bucket {bucket_name}")
return []
except ClientError as e:
print(f"Error listing objects: {e}")
return None
# --- Example Usage ---
if __name__ == "__main__":
# Replace with your actual bucket name and a dummy file
my_bucket = "your-unique-s3-bucket-name"
local_file = "example.txt"
# Create a dummy file for upload
with open(local_file, "w") as f:
f.write("Hello, S3! This is a test file.")
# 1. Upload the file
if upload_file_to_s3(local_file, my_bucket):
# 2. List objects in the bucket
list_s3_objects(my_bucket)
# Clean up the dummy file
import os
os.remove(local_file)
Before running this code, ensure you have the boto3 library installed (pip install boto3) and your AWS credentials configured, for example, via environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY) or the AWS CLI configuration file. You will also need to create an S3 bucket with a globally unique name in your AWS account. The AWS S3 documentation provides comprehensive guides for setting up and using the service.