Amazon Simple Storage Service (S3) is an object storage service that offers industry-leading scalability, data availability, security, and performance. This means that you can use S3 to store and retrieve any amount of data, at any time, from anywhere on the web.
S3 is designed to make web-scale computing easier for developers. It is a simple web service interface that you can use to store and retrieve any amount of data, at any time, from anywhere on the Internet. S3 is an inexpensive way to store data for highly available and scalable applications.
In Amazon S3, an object is a file, and every object has a key (a name) and a value (the data that the file contains). Object values can range from a few kilobytes to a maximum of 5 terabytes. Objects are stored in buckets, and every object must reside in a bucket.
A typical S3 object might look like this:
my-bucket/my-file.txt
The key (my-file.txt) is the name of the file, and the value is the contents of the file. The file might contain text, images, videos, or any other type of data.
A bucket is a container for objects. Every object in Amazon S3 must reside in a bucket. Buckets partition the namespace of objects stored in S3 at the top level. By creating a unique bucket name, you can guarantee that no other Amazon S3 user will be able to access your data.
Buckets can be used to host a static website. You can configure a bucket to serve web traffic directly from Amazon S3. This can be useful if you have a website with a large amount of static content (such as images, videos, or CSS and JavaScript files).
Creating a bucket is a simple, two-step process:
After you create a bucket, you can upload objects to the bucket. To upload an object:
To download an object:
To delete an object:
To delete a bucket:
An S3 prefix is a string that is used to identify a group of objects. S3 prefixes can be used to logically organize your Amazon S3 data. For example, you might use an S3 prefix to group all of the files that are related to a certain project.
S3 prefixes can be up to 1,024 characters long, and they must be unique within a bucket.
To create an S3 prefix:
An S3 policy is a document that specifies who has access to your S3 data and what actions they can perform on that data. S3 policies can be used to restrict access to specific buckets or objects.
Policies are attached to resources, such as buckets or objects. When a policy is attached to a resource, it defines the permissions for that resource.
To create an S3 policy, you need to create a policy document. A policy document is a JSON document that specifies the permissions for a resource.
To attach an S3 policy to a bucket:
To attach an S3 policy to an object:
The easiest way to generate an S3 policy is to use the Policy Generator. The Policy Generator is a tool that helps you create policies that are tailored to your specific needs.
To use the Policy Generator:
S3 policies can be written in any of the following languages:
To find the ARN for your S3 bucket:
To find the ARN for your S3 object: