Open In App

How To Store Data in a S3 Bucket?

Last Updated : 28 Mar, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Pre-requisite: S3 (Simple Storage Service)

AWS S3(Simple Storage Service) is a storage-as-a-service platform provided by Amazon. S3 offers various types of storage classes such as Standard, Standard IA, Intelligent, Reduced Redundancy, and Glacier. Amazon S3 stores the data inside a bucket in the form of an object. The object inside the S3 bucket can be accessed, versioned, and deleted as per requirement. We can store data in S3 using various methods such as below.

 Methods to Store Data in S3

  • AWS Console: We can access S3 service using a web-based AWS console. We can upload and store files as objects in an S3 bucket using web UI.
  • AWS CLI: AWS Command line interface uses various commands which can be used to store and retrieved objects in an S3 bucket.
  • AWS SDK: Storing objects to an S3 bucket is also available with the help of programming language-specific SDKs provided by AWS. We can easily import AWS SDK and use it to store application files in S3.
  • AWS S3 Rest APIs: S3 provides a REST application programming interface for accessing S3 buckets using Amazon S3 endpoints. The S3 bucket can be accessed with help of standard HTTP and HTTPS requests.

As all other methods need some understanding of other concepts let’s see storing data to S3 using AWS Console.

Steps to Store Data to S3 using AWS Console

Step 1: First We need to create an S3 bucket in AWS. To create a bucket navigate to Services > Storage >S3 > Buckets

Step 2: On the S3 page select Create Bucket.

s3 bucket

 

Step 3: In the bucket, creation page fill details below.

Bucket Name Give a globally unique name to the bucket
AWS Region Select the Region in which the bucket should be created
Object Ownership You can specify ACL if you want
Block public access You can allow public access or block it
Bucket Versioning If enabled all objects will be versioned
Tags Optional
Default Encryption You can specify the default encryption type
Advanced Settings You can enable bucket lock if you want
bucket config

 

For now, we will make all objects public and keep all other settings default.

access settings

 

After specifying settings click on Create.

Step 4: Once the bucket is created we can store files in it. To store files select Upload from the bucket details page.

bucket created

 

Step 5: On the upload, page select upload files and choose the file you want to upload. 

image uploaded

 

Step 6: Once the file is uploaded you can specify permissions and storage class for the object. Then click on Upload.

storage classification

 

Step 7: On successful upload, the file is available on the bucket and can be seen on the details page.

file uploaded

 

Step 8: You can click on actions to perform various operations on objects stored in the bucket. We have stored our data in S3. Similarly, we can use other methods to store the data in S3.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads