Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • DevOps Lifecycle
  • DevOps Roadmap
  • Docker Tutorial
  • Kubernetes Tutorials
  • Amazon Web Services [AWS] Tutorial
  • AZURE Tutorials
  • GCP Tutorials
  • Docker Cheat sheet
  • Kubernetes cheat sheet
  • AWS interview questions
  • Docker Interview Questions
  • Ansible Interview Questions
  • Jenkins Interview Questions
Open In App
Next Article:
Introduction to AWS Elastic Block Store(EBS)
Next article icon

Introduction to AWS Simple Storage Service (AWS S3)

Last Updated : 04 Jan, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

AWS offers a wide range of storage services that can be configured depending on your project requirements and use cases. AWS comes up with different types of storage services for maintaining highly confidential data, frequently accessed data, and often accessed storage data. You can choose from various storage service types such as Object Storage as a Service(Amazon S3), File Storage as a Service (Amazon EFS), Block Storage as a Service (Amazon EBS), backups, and data migration options.

Table of Content

  • What is Amazon S3?
  • What is Amazon S3 Used for?
  • What is an Amazon S3 bucket?
  • How Does Amazon S3 works?
  • How To Use an Amazon S3 Bucket?
  • What are the types of S3 Storage Classes?
  • How to Upload and Manage Files on Amazon S3?
  • How to Access Amazon S3 Bucket?
  • AWS S3 Bucket Permissions
  • Features of Amazon S3
  • Advantages of Amazon S3
  • Amazon S3 - FAQs

What is Amazon S3?

Amazon S3 is a Simple Storage Service in AWS that stores files of different types like Photos, Audio, and Videos as Objects providing more scalability and security to. It allows the users to store and retrieve any amount of data at any point in time from anywhere on the web. It facilitates features such as extremely high availability, security, and simple connection to other AWS Services.

What is Amazon S3 Used for?

Amazon S3 is used for various purposes in the Cloud because of its robust features with scaling and Securing of data. It helps people with all kinds of use cases from fields such as Mobile/Web applications, Big data, Machine Learning and many more. The following are a few Wide Usage of Amazon S3 service.

  • Data Storage: Amazon s3 acts as the best option for scaling both small and large storage applications. It helps in storing and retrieving the data-intensitive applications as per needs in ideal time.
  • Backup and Recovery: Many Organizations are using Amazon S3 to backup their critical data and maintain the data durability and availability for recovery needs.
  • Hosting Static Websites: Amazon S3 facilitates in storing HTML, CSS and other web content from Users/developers allowing them for hosting Static Websites benefiting with low-latency access and cost-effectiveness. To know more detailing refer this Article - How to host static websites using Amazon S3
  • Data Archiving: Amazon S3 Glacier service integration helps as a cost-effective solution for long-term data storing which are less frequently accessed applications.
  • Big Data Analytics: Amazon S3 is often considered as data lake because of its capacity to store large amounts of both structured and unstructured data offering seamless integration with other AWS Analytics and AWS Machine Learning Services.

What is an Amazon S3 bucket?

Amazon S3 bucket is a fundamental Storage Container feature in AWS S3 Service. It provides a secure and scalable repository for storing of Objects such as Text data, Images, Audio and Video files over AWS Cloud. Each S3 bucket name should be named globally unique and should be configured with ACL (Access Control List).

How Does Amazon S3 works?

Amazon S3 works on organizing the data into unique S3 Buckets, customizing the buckets with Acccess controls. It allows the users to store objects inside the S3 buckets with facilitating features like versioning and lifecycle management of data storage with scaling. The following are a few main features of Amazon s3:

1. Amazon S3 Buckets and Objects

Amazon S3 Bucket: Data, in S3, is stored in containers called buckets. Each bucket will have its own set of policies and configurations. This enables users to have more control over their data. Bucket Names must be unique. Can be thought of as a parent folder of data. There is a limit of 100 buckets per AWS account. But it can be increased if requested by AWS support.

Amazon S3 Objects: Fundamental entity type stored in AWS S3.You can store as many objects as you want to store. The maximum size of an AWS S3 bucket is 5TB. It consists of the following:

  • Key
  • Version ID
  • Value
  • Metadata
  • Subresources
  • Access control information
  • Tags

2. Amazon S3 Versioning and Access Control

S3 Versioning: Versioning means always keeping a record of previously uploaded files in S3. Points to Versioning are not enabled by default. Once enabled, it is enabled for all objects in a bucket. Versioning keeps all the copies of your file, so, it adds cost for storing multiple copies of your data. For example, 10 copies of a file of size 1GB will have you charged for using 10GBs for S3 space. Versioning is helpful to prevent unintended overwrites and deletions. Objects with the same key can be stored in a bucket if versioning is enabled (since they have a unique version ID). To know more about versioning refer this article - Amazon S3 Versioning

Access control lists (ACLs): A document for verifying access to S3 buckets from outside your AWS account. An ACL is specific to each bucket. You can utilize S3 Object Ownership, an Amazon S3 bucket-level feature, to manage who owns the objects you upload to your bucket and to enable or disable ACLs.

3. Bucket policies and Life Cycles

Bucket Policies: A document for verifying the access to S3 buckets from within your AWS account, controls which services and users have what kind of access to your S3 bucket. Each bucket has its own Bucket Policies.

Lifecycle Rules: This is a cost-saving practice that can move your files to AWS Glacier (The AWS Data Archive Service) or to some other S3 storage class for cheaper storage of old data or completely delete the data after the specified time. To know more about refer this article - Amazon S3 Life Cycle Management

4. Keys and Null Objects

Keys: The key, in S3, is a unique identifier for an object in a bucket. For example in a bucket 'ABC' your GFG.java file is stored at javaPrograms/GFG.java then 'javaPrograms/GFG.java' is your object key for GFG.java.

Null Object: Version ID for objects in a bucket where versioning is suspended is null. Such objects may be referred to as null objects.List) and Other settings for managing data efficiently.

How To Use an Amazon S3 Bucket?

You can use the Amazon S3 buckets by following the simple steps which are mentioned below. To know more how to configure about Amazon S3 refer to the Amazon S3 – Creating a S3 Bucket.

Step 1: Login into the Amazon account with your credentials and search form S3 and click on the S3. Now click on the option which is "Create bucket" and configure all the options which are shown while configuring.

Step 2: After configuring the AWS bucket now upload the objects into the buckets based upon your requirement. By using the AWS console or by using AWS CLI following is the command to upload the object into the AWS S3 bucket.

aws s3 cp <local-file-path> s3://<bucket-name>/

Step 3: You can control the permissions of the objects which was uploaded into the S3 buckets and also who can access the bucket. You can make the bucket public or private by default the S3 buckets will be in private mode.

Step 4: You can manage the S3 bucket lifecycle management by transitioning. Based upon the rules that you defined S3 bucket will be transitioning into different storage classes based on the age of the object which is uploaded into the S3 bucket.

Step 5: You need to turn to enable the services to monitor and analyze S3. You need to enable the S3 access logging to record who was requesting the objects which are in the S3 buckets.

What are the types of S3 Storage Classes?

AWS S3 provides multiple storage types that offer different performance and features and different cost structures. 

  • Standard: Suitable for frequently accessed data, that needs to be highly available and durable.
  • Standard Infrequent Access (Standard IA): This is a cheaper data-storage class and as the name suggests, this class is best suited for storing infrequently accessed data like log files or data archives. Note that there may be a per GB data retrieval fee associated with the Standard IA class.
  • Intelligent Tiering: This service class classifies your files automatically into frequently accessed and infrequently accessed and stores the infrequently accessed data in infrequent access storage to save costs. This is useful for unpredictable data access to an S3 bucket.
  • One Zone Infrequent Access (One Zone IA): All the files on your S3 have their copies stored in a minimum of 3 Availability Zones. One Zone IA stores this data in a single availability zone. It is only recommended to use this storage class for infrequently accessed, non-essential data. There may be a per GB cost for data retrieval.
  • Reduced Redundancy Storage (RRS): All the other S3 classes ensure the durability of 99.999999999%. RRS only ensures 99.99% durability. AWS no longer recommends RRS due to its less durability. However, it can be used to store non-essential data.

To know more about , refer this article - Amazon S3 Storage Classes

How to Upload and Manage Files on Amazon S3?

Firstly you have to Amazon s3 bucket for uploading and managing the files on Amazon S3.  Try to create the S3 Bucket as discussed above. Once the S3 Bucket is created, you can upload the files through various ways such as AWS SDKs, AWS CLI, and Amazon S3 Management Console. Try managing the files by organizing them into folders within the S3 Bucket and applying access controls to secure the access. Features like Versioning and Lifecycle policies provide the management of data efficiently with optimization of storage classes.
To know more detailing refer this article - How to Store and Download Obejcts in Amazon S3?

How to Access Amazon S3 Bucket?

You can work and access the Amazon S3 bucket by using any one of the following methods

  1. AWS Management Console
  2. AWS CLI Commands
  3. Programming Scripts ( Using boto3 library of Python )

1. AWS Management Console

You can access the AWS S3 bucket using the AWS management console which is a web-based user interface. Firstly you need to create an AWS account and login to the Web console and from there you can choose the S3 bucket option from Amazon S3 service. ( AWS Console >> Amazon S3 >> S3 Buckets )

2. AWS CLI Commands

In this methods firstly you have to install the aws cli software in the terminal and try on configuring the aws account with access key, secret key and the default region. Then on taking the `aws --help` , you can figure out the s3 service usage. For example , To view try on running following command:

aws s3 ls

3. Programming scripts

You can configure the Amazon S3 bucket by using a scripting programing languages like Python and with using libraries such as boto3 library you can perform the AWS S3 tasks. To know more about refer this article - How to access Amazon S3 using python script.

AWS S3 Bucket Permissions

You can manage the permission of S3 buckets by using several methods following are a few of them.

  1. Bucket Policies: Bucket policies can be attached directly to the S3 bucket and they are in JSON format which can perform the bucket level operations. With the help of bucket policies, you can grant permissions to the users who can access the objects present in the bucket. If you grant permissions to any user he can download, and upload the objects to the bucket. You can create the bucket policy by using Python.
  2. Access Control Lists (ACLs): ACLs are legacy access control mechanisms for S3 buckets instead of ACLs we are using the bucket policies to control the permissions of the S3 bucket. By using ACL you can grant the read, and access to the S3 bucket or you can make the objects public based on the requirements.
  3. IAM Policies: IAM policies are mostly used to manage the permissions to the users and groups and resources available in the AWS by using the IAM roles options. You can attach an IAM policy to an IAM entity (user, group, or role) granting them access to specific S3 buckets and operations.

The most effective way to control the permissions to the S3 buckets is by using bucket policies.

Features of Amazon S3

  • Durability: AWS claims Amazon S3 to have a 99.999999999% of durability (11 9's). This means the possibility of losing your data stored on S3 is one in a billion.
  • Availability: AWS ensures that the up-time of AWS S3 is 99.99% for standard access.
    • Note that availability is related to being able to access data and durability is related to losing data altogether.
  • Server-Side-Encryption (SSE): AWS S3 supports three types of SSE models:
    • SSE-S3: AWS S3 manages encryption keys.
    • SSE-C: The customer manages encryption keys.
    •  SSE-KMS: The AWS Key Management Service (KMS) manages the encryption keys.
  • File Size support: AWS S3 can hold files of size ranging from 0 bytes to 5 terabytes. A 5TB limit on file size should not be a blocker for most of the applications in the world.
  • Infinite storage space: Theoretically AWS S3 is supposed to have infinite storage space. This makes S3 infinitely scalable for all kinds of use cases.
  • Pay as you use: The users are charged according to the S3 storage they hold.

Advantages of Amazon S3

  1. Scalability: Amazon S3 can be scalable horizontally which makes it handle a large amount of data. It can be scaled automatically without human intervention.
  2. High availability: AmazonS3 bucket is famous for its high availability nature you can access the data whenever you required it from any region. It offers a Service Level Agreement (SLA) guaranteeing 99.9% uptime.
  3. Data Lifecycle Management: You can manage the data which is stored in the S3 bucket by automating the transition and expiration of objects based on predefined rules. You can automatically move the data to the Standard-IA or Glacier, after a specified period.
  4. Integration with Other AWS Services: You can integrate the S3 bucket service with different services in the AWS like you can integrate with the AWS lambda function where the lambda will be triggered based upon the files or objects added to the S3 bucket.

Next Article
Introduction to AWS Elastic Block Store(EBS)

M

mananutsav7
Improve
Article Tags :
  • Amazon Web Services
  • DevOps
  • AWS
  • aws-s3

Similar Reads

    Amazon Web Services (AWS) Tutorial
    Amazon Web Service (AWS) is the world’s leading cloud computing platform by Amazon. It offers on-demand computing services, such as virtual servers and storage, that can be used to build and run applications and websites. AWS is known for its security, reliability, and flexibility, which makes it a
    13 min read
    Introduction to Amazon Web Services
    Amazon Web Services (AWS) is one of the world's leading cloud platforms in providing the web services of various domains. AWS follows the trends of digital IT and comes up needy services with optimized performances covering a wide range of services from Compute to Storage. It covers a wider range of
    12 min read
    Amazon Web Services (AWS) - Free Tier Account Set up
    Creating an AWS account is the first step to access these powerful tools. Once your account is set up, you'll be able to use AWS's vast range of services, making it easier to manage and scale applications. In this article, you'll learn the process of setting up your AWS account and logging into the
    7 min read

    Compute Services

    What is Elastic Compute Cloud (EC2)?
    EC2 stands for Elastic Compute Cloud a service from Amazon Web Services (AWS). EC2 is an on-demand computing service on the AWS cloud platform. It lets you rent virtual computers to run your applications. You pay only for what you use. Instead of buying and managing your own servers, EC2 gives you a
    10 min read
    AWS Lambda
    AWS Lambda is a powerful serverless computing service that automatically runs code in response to events, without requiring you to manage the underlying infrastructure. It supports event-driven applications triggered by events such as HTTP requests, DynamoDB table updates, or state transitions. You
    11 min read
    Amazon Elastic Container Service (ECS)
    Amazon Elastic Container Service (ECS) is a fully managed service that enables users to run Docker-based applications in containers across a cluster of EC2 instances. ECS simplifies container orchestration, allowing you to deploy, manage, and scale containerized applications efficiently. The service
    11 min read

    Storage Services

    Introduction to AWS Simple Storage Service (AWS S3)
    AWS offers a wide range of storage services that can be configured depending on your project requirements and use cases. AWS comes up with different types of storage services for maintaining highly confidential data, frequently accessed data, and often accessed storage data. You can choose from vari
    13 min read
    Introduction to AWS Elastic Block Store(EBS)
    AWS Storage Services: AWS offers a wide range of storage services that can be provisioned depending on your project requirements and use case. AWS storage services have different provisions for highly confidential data, frequently accessed data, and the not so frequently accessed data. You can choos
    6 min read
    Amazon RDS - Introduction to Amazon Relational Database System
    Amazon RDS Is a relational database management system along with the facilities of the AWS cloud platform. It facilitates us in creating database instances as per our requirements, i.e. resizable, variety of database types, etc. Table of ContentWhat is Amazon Relational Database Service (Amazon RDS)
    15+ min read

    AWS Networking Services

    Amazon VPC - Introduction to Amazon Virtual Private Cloud
    Amazon VPC or Amazon Virtual Private Cloud is a service that allows its users to launch their virtual machines in a protected as well as isolated virtual environment defined by them. You have complete control over your VPC, from creation to customization and even deletion. It's applicable to organiz
    8 min read
    Introduction to Amazon Route53
    In Simplest terms, cloud computing means storing and accessing the data and programs on remote servers hosted on the internet instead of the computer’s hard drive or local server. It is also referred to as Internet-based computing. In this article we guide on discussing what is Amazon Route53, how d
    13 min read
    Amazon VPC - Working with Direct Connect Service
    Amazon Virtual Private Cloud or Amazon VPC is a service that enables customers to create their virtual network in a secure and Isolated environment. VPC offers us a secure environment in which we can create our network and use Amazon services as needed. You can have full control over VPC. whether it
    4 min read

    AWS Database Services

    AWS DynamoDB - Creating a Table
    DynamoDB allows users to create databases capable of storing and retrieving any amount of data and comes in handy while serving any amount of traffic. It dynamically manages each customer’s request and provides high performance by automatically distributing data and traffic over servers. It is a ful
    2 min read
    What is Amazon Aurora? In Detail Explanation
    A Cloud database is a database service fabricated and accessed through a cloud platform. It serves a considerable lot of indistinguishable functions as a conventional database with the additional adaptability of cloud computing. Users install the software on a cloud framework to implement the databa
    11 min read
    Difference between Amazon Redshift and PostgreSQL
    Choosing the right database can greatly affect how well your data is managed and analyzed. Amazon Redshift and PostgreSQL are two popular options, each with unique strengths. Amazon Redshift is a powerful data warehouse designed for handling large-scale data analysis, while PostgreSQL is a flexible,
    3 min read

    AWS Machine Learning Services

    What is SageMaker in AWS?
    Machine Learning is the hottest topic in the current era and the leading cloud provider Amazon web service (AWS) provides lots of tools to explore Machine Learning, creating models with a high accuracy rate. This article makes you familiar with one of those services on AWS i.e Amazon Sagemaker which
    13 min read
    What is AWS Deeplens?
    Pre-requisite: AWS AWS Deeplens is a deep learning-enabled video camera that is developed by Amazon Web Services (AWS). It is designed to make it easy for developers to create and deploy deep learning models on edge devices, such as cameras and robots. With Deeplens, developers can use pre-built mod
    3 min read

    AWS Developer Tools

    Working with AWS CodeCommit
    AWS CodeCommit is a source control service that is provided by Amazon Web Service which is fully managed. It is a version code service. It helps to manage and store assets such as codes or documents or any other type of file such as binary file etc. It allows the team to work collaboratively in a se
    4 min read
    How to Build a CI/CD Pipeline with AWS?
    Building and deploying code manually every time takes a lot of effort and can lead to mistakes. A CI/CD pipeline makes this easier by automating testing, building, and deploying your code for you. Now you might wonder, "Why should I use AWS for this when tools like Jenkins or GitLab CI already exist
    13 min read
    How to Build a AWS Data Pipeline?
    Amazon Web Services (AWS) is a subsidiary of Amazon offering cloud computing services and APIs to businesses, organizations, and governments. It provides essential infrastructure, tools, and computing resources on a pay-as-you-go basis. AWS Data Pipeline is a service that allows users to easily tran
    6 min read

    AWS Management and Monitoring

    Introduction to Amazon CloudWatch
    Amazon CloudWatch is a service used for monitoring and observing resources in real-time, built for DevOps engineers, developers, site reliability engineers (SREs), and IT managers. CloudWatch provides users with data and actionable insights to monitor their respective applications, stimulate system-
    10 min read
    AWS CloudTrail
    AWS With the help of a tool called Cloud Trail, offered by Amazon Web Services (AWS), you can keep track of and document activities that take place inside your AWS infrastructure. It gives you a thorough event history of every activity users, services, and resources took while using your AWS account
    10 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences