Amazon S3 (Simple Storage Service) is the publicly available online web service offered by Amazon Web Services. S3 provides unlimited cloud storage for your data with no volume restrictions. Bucket is one of key concept for Amazon S3.
Common Information
Every object stored in S3 is placed in a bucket. It is possible to create up to 100 buckets per account. Buckets' volume is unlimited. All folders and files in S3 buckets are called «Objects».
All buckets share common namespace in Amazon S3. Therefore each bucket name must be unique: you can’t use the name that's already occupied by other bucket. The name becomes available only when bucket is deleted.
There are more bucket restrictions and limitations like rules for bucket naming or impossibility to put one bucket inside another. Also S3 buckets have several properties and usage methods. Let's make a small overview.
Policies and Security, ACL
Access to buckets and objects is managed by Policies and ACL (Access Control list). ACL is a list with specified permissions like read/write or full control for selected groups of users. You can use it to make you objects in S3 bucket publicly available.
S3 Bucket Policies are used for access management too, but that is more difficult and flexible instrument than ACL. You can grant or deny permissions for specified group of users, for each action or group of actions, and also you can specify some conditions like time, source etc. For example, you can deny access to get objects to all requests from user agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36".
To write S3 bucket policies you need to use JSON-based APL (access policy language) or AWS Policy Generator.
Accessing, Website and CloudFront
There are several ways to access objects in S3 buckets: (i) via AWS console, (ii) with cloud managers like CloudBerry Explorer or (iii ) through direct links. Another two ways – hosting a static web site on Amazon S3 and using CloudFront distributions. Also there is a way to download objects via BitTorrent.
S3 bucket can be used to host simple static website that doesn't use server-side scripts such as PHP, JSP, or ASP.NET. If you enable "s3 website" feature you can access website stored in you bucket with address <bucket-name>.s3-website-<AWS-region>.amazonaws.com. Instead of accessing the website by using an Amazon S3 website endpoint, you can use your own domain by using redirect requests.
One of the interesting ways to use S3 buckets is creation of CloudFront distributions. CloudFront is a web service that speeds up access of end users to the static and dynamic web content - html, css, php, images, video etc. For more information see AWS CloudFront Overview.
Using Buckets for Backup and Restore Data
Data backup is very important for users and enterprises that need to increase reliability of their systems and data. In this case storing data in S3 buckets is one of the very popular, easy-to-use and low cost solutions.
Backing up is not Amazon S3 service therefore you need to use the third-party software such as CloudBerry Backup and CloudBerry Explorer.
Lifecycle and Versioning
Bucket versioning allows you to preserve, retrieve, and restore every version of every object stored in this bucket. Versioning is intended to increase a reliability of storage: you can restore deleted or overwritten objects. This option has restriction: once enabled for the bucket, it cannot be disabled, only suspended.
Lifecycle defines how Amazon S3 manages objects during their lifetime, from creation to delete. The objects that use Lifecycle can be automatically deleted or marked for the Glacier storage after a specified period of time. It helps to reduce storage costs. Recently Amazon expanded possibilities of the Versioning, by adding an Lifecycle option. For more information see Amazon S3 Now Supports Lifecycle Rules for Versioning.
Logging
For all created buckets you can enable a logging. Log record contains details about the requests, resources, time and date the request was processed. Logging can be applied to any bucket in your account.
RRS, Tagging and Pricing
You can find prices for storage, requests and data transfer at Amazon S3 Pricing – that’s all information about paying and prices. But some moments we have to be noted.
When you want to share data but not incur charges associated with others accessing the data you can configure bucket to charge requester. This option called "Requester Pays". If enabled, one requested an object will pay the cost of the request and the data download from a bucket. Storage cost is always paid by the owner. Anonymous access to that bucket is not allowed.
Also pay attention to the section "Request Pricing". Request in Amazon S3 refers to any user action with buckets and objects. Accessing the folder is obtaining the list of files in the folder, accessing the bucket is obtaining the list of files and folders in a bucket - all these actions are charged by AWS. Of course the price is insignificant small, but you need to keep it in mind when working with a large number of files.
The price also depends on whether RRS (Reduced Redundancy Storage) is enabled or disabled. RRS is a storage option that allows you to reduce costs by storing a non-critical and reproducible data.
Tagging (Cost Allocation Tagging) is an AWS billing feature that enables you to organize and track your AWS costs using tags for buckets. It allows easily track buckets' cost with identical tags against buckets with different tags.