Amazon Simple Storage Service (Amazon S3)

AWS S3 Core Concepts

S3 Basics Demo

Learn how to create, configure, and manage an Amazon S3 bucket. In this step-by-step guide, we’ll cover the global namespace, bucket configuration, uploading and organizing objects, and safely deleting buckets.

Accessing the S3 Console

  1. Sign in to the AWS Management Console and search for S3.
  2. Depending on your account state, you’ll see one of two views:

If you have no buckets, an intro screen appears with a Create bucket button:
The image shows the Amazon S3 management console webpage, featuring an introduction video and options to create a bucket, view pricing, and access resources.

Otherwise, you’ll see your existing buckets and the Create bucket option:
The image shows the AWS S3 Management Console with an account snapshot displaying storage details and a list of AWS regions. There are no buckets created, and a dropdown menu of regions is visible.

Note

Amazon S3 uses a global namespace. The top‐left region selector is always Global and displays buckets from all regions. You pick a region only when creating a new bucket.

Creating a Bucket

  1. Click Create bucket.
  2. Enter a globally unique name. If your choice is taken (e.g., demo), you’ll see an error:
    The image shows an Amazon S3 "Create bucket" configuration page, where a user is attempting to create a bucket named "demo," but an error indicates that the bucket name already exists. It includes options for setting the AWS region, object ownership, and block public access settings.

Note

For bucket naming rules (character limits, allowed characters, and examples), see the Bucket Naming Rules.

  1. Choose a unique name (for example, kodekloud-demo-123):
    The image shows a webpage from the Amazon Simple Storage Service (S3) User Guide detailing bucket naming rules, including character limits and formatting restrictions. It also provides example bucket names and additional notes on compatibility and usage.

  2. Select the target region (e.g., US East (N. Virginia) us-east-1).

  3. Configure features or leave defaults:

    • Object ownership & ACLs
    • Block public access
    • Versioning & encryption
    • Tags & advanced settings

    The image shows a settings page for configuring block public access options for an Amazon S3 bucket, with checkboxes for different access control settings and warnings about public access.
    The image shows a section of an AWS S3 bucket configuration page, including options for tags, default encryption, and advanced settings like Object Lock.

  4. Click Create bucket. You’ll see your new bucket in the list:
    The image shows the Amazon S3 management console with a notification of a successfully created bucket named "kk-demo-123" in the US East (N. Virginia) region. The bucket and objects are not public.

Exploring Bucket Details

Click your bucket’s name to open its overview. You’ll find tabs for Objects, Properties, Permissions, Metrics, and Management.

FeatureDescription
Region & ARNShows the bucket’s region and Amazon Resource Name.
Creation DateTimestamp when the bucket was created.
VersioningIndicates if object versioning is enabled or disabled.
EncryptionDefault server-side encryption (SSE) settings for new objects.
Other OptionsLogging, CloudTrail, events, transfer acceleration, object lock, requester pays, and website hosting.

In Permissions, manage ACLs or bucket policies:
The image shows the permissions settings for an Amazon S3 bucket named "kk-demo-123," indicating that the bucket and its objects are not public, with public access blocked.

Under Metrics, view CloudWatch data like total storage and object count. Management lets you set lifecycle rules, replication, inventory, and access points:
The image shows an Amazon S3 management console interface for a bucket named "kk-demo-123," specifically on the "Access Points" tab, with no access points currently created.

Uploading Objects

  1. Go to the Objects tab and click Upload.
  2. Drag and drop files or use Add files. For example, upload pexels-julio-nery-1687147.jpg (2.7 MB JPEG):
    The image shows an AWS S3 upload interface where a file named "pexels-julio-nery-1687147.jpg" is being prepared for upload to a specified S3 bucket. The file is 2.7 MB in size.
  3. Accept defaults for permissions, storage class (Standard), and skip advanced settings.
  4. Click Upload and wait for completion:
    The image shows an Amazon S3 Management Console screen displaying storage class options, including Standard, Intelligent-Tiering, and others, with details on availability zones and storage duration.
  5. After closing the dialog, you’ll see your file listed:
    The image shows an Amazon S3 bucket interface with one file named "pexels-julio-neri-1687147.jpg" listed, including details like type, last modified date, size, and storage class.

Object Details

Click the object name to inspect:

  • Size, last modified, and region
  • Object URI and ARN
  • ETag, object URL
  • Per-object settings: storage class, SSE, checksums, tags, and locks

The image shows an Amazon S3 console page with settings for storage class, server-side encryption, additional checksums, and tags. The storage class is set to "Standard," encryption uses "Amazon S3 managed keys (SSE-S3)," and no tags are associated with the resource.
The image shows an Amazon S3 console interface displaying details of an object named "pexels-julio-nery-1687147.jpg" in a bucket. It includes information such as the owner, region, size, type, and object URL.

Accessing Objects

Attempting to GET the object URL anonymously returns:

<Error>
  <Code>AccessDenied</Code>
  <Message>Access Denied</Message>
  <RequestId>PXX0A25XAZ252WZ0</RequestId>
  <HostId>Rh0s1Dk51BtkU1N0BXY4j2p2KLvWeg5eSu/Ry1NkxAMXFtbFQKTg=</HostId>
</Error>

Note

By default, both buckets and objects are private. Use the Open button in the console (with your AWS credentials) to view private files, or adjust permissions for public access.

Organizing Objects with Folders

Although S3 has a flat key-value structure, the console lets you simulate folders:

  1. Click Create folder, enter a name (e.g., food), and confirm:
    The image shows an Amazon S3 interface for creating a folder, with options for entering a folder name and selecting server-side encryption settings.
  2. Open the folder and upload images (burger, pizza, sandwich, steak):
    The image shows an Amazon S3 bucket interface with a folder named "food" containing four image files: burger.jpg, pizza.jpg, sandwich.jpg, and steak.jpg. Each file is listed with its type, last modified date, size, and storage class.

Each object key is prefixed with food/. Permissions and access behave identically to root-level objects.

Deleting Objects

  1. Select the object(s) you want to remove.
  2. Click Delete, type permanently delete, and confirm:
    The image shows an Amazon S3 interface for deleting objects, with a warning about deletion consequences and a specified object listed for deletion.

Warning

Without versioning enabled, deletion is permanent and cannot be undone.

Moving Objects

S3 doesn’t support a native “move” operation. Instead, you rename an object by copying it to a new key prefix:

  1. Create a new folder (e.g., test) under your bucket:
    The image shows an Amazon S3 console with a folder named "food" containing several image files like "burger.jpg," "pizza.jpg," "sandwich.jpg," and "steak.jpg." A new folder named "test" has been successfully created.
  2. Select Actions > Move, set the destination key (e.g., food/test/steak.jpg), or browse and apply. The object is effectively renamed under the new prefix.

Deleting the Bucket

To delete an S3 bucket, it must be empty:

  1. Attempting to delete a non-empty bucket shows an error:
    The image shows an Amazon S3 console page with a warning that a bucket cannot be deleted because it is not empty. It prompts the user to empty the bucket before proceeding with deletion.
  2. Click Empty, type permanently delete, and confirm to clear contents.
  3. Finally, select Delete bucket, enter the bucket name, and confirm.

Watch Video

Watch video content

Previous
What is AWS S3