AWS S3 stands for Simple Storage Service.
S3 is object storage which allows you to upload files.
- The max files size that can be stored is 5TB.
- The files can be stored in a structure called buckets.
A bucket is your root resource in which you add, delete or modify objects.
Your bucket name should be unique.
There are all sorts of configuration options that you can set on buckets like permission, posting options and logging.
Functions of an S3 bucket:
- It can trigger events when objects are added/modified or deleted.
- It can preserve older versions of objects.
- It can automatically replicate the object access regions.
Once created, the S3 buckets are accessed via a URL.
Let us see how can we create our first bucket:
Step 1) Sign in to AWS Management Console and choose from S3 from set of AWS services.
Step 2) Click on Create Bucket.
Step 3) Enter you bucket name (should be unique and DNS Compliant) and choose a region(choose the nearest one to dodge the latency issues)
Just click next options for configure options and set permissions.
Your bucket has been created,
Click on the bucket.
You will see below screen:
Let us upload some files to our bucket:
I will upload an html file.
Click on next for rest of the options.
And here it is your file has been uploaded:
Click on the bucket to see the details and your file access URL.
When you will click on the link you will get following error “Access Denied”.
Why this error came? Because we did not made our bucket publicly enabled with encryption.
To make the file accessible just click on “Make Public” as shown below:
Re-open the link back again,
and you can see our file is now accessible:
So now we have successfully seen the basics of S3 and how to use it.
Advanced S3 includes setting encryption with buckets, custom bucket configuration, CORS enablement to access other buckets from your bucket.
Application of S3 include:
- Software Delivery
- Application and Media files Hosting
- Data Backup
- Amazon S3 provides the option to host static websites with index document support and error document support
Amazon S3 pricing varies depending on the different S3 storage classes. Prices vary from storage usage, number of requests, and data transfers.
Price for the first 50 Tb ranges from $0.023 to $0.0405 per GB per month, depending on the choice of location for storage.
For any questions related to AWS S3 please post them on the comments below.