You can empty a bucket, which deletes all the objects in the bucket without deleting the bucket.
To empty a bucket
In the Bucket name list, choose the bucket icon next to the name of the bucket that you want to empty and then choose Empty bucket.
In the Empty bucket dialog box, type the name of the bucket for confirmation and then choose Confirm.
You can delete a bucket and all the objects contained in the bucket.
To delete a bucket
In the Bucket name list, choose the bucket icon next to the name of the bucket that you want to delete and then choose Delete bucket.
In the Delete bucket dialog box, type the name of the bucket for delete confirmation and then choose Confirm.
We will upload files into bucket or bucket/folder/file, if successful upload then status returned is HTTP200 code.
S3 Security
- Bucket Policies
- ACL - Drill down to object level access
S3 Encryption
- In data transit - SSL/TLS
- Data at rest :
-SSE-S3 (Server Side Encryption AES-256 advance encryption method)
-SSE-KMS (Server Side Encryption Key Management Service)
-SSE-C (Server Side Encryption (Client side Encryption technique - client library such as Amazon S3 Encryption Client)
Advantages to Amazon S3
Amazon S3 is intentionally built with a minimal feature set that focuses on simplicity and robustness.
Following are some of advantages of the Amazon S3 service:
Create Buckets – Create and name a bucket that stores data. Buckets are the fundamental container in
Amazon S3 for data storage.
Store data in Buckets – Store an infinite amount of data in a bucket. Upload as many objects as you
like into an Amazon S3 bucket. Each object can contain up to 5 TB of data. Each object is stored and
retrieved using a unique developer-assigned key.
Download data – Download your data or enable others to do so. Download your data any time you like
or allow others to do the same.
Permissions – Grant or deny access to others who want to upload or download data into your
Amazon S3 bucket. Grant upload and download permissions to three types of users. Authentication
mechanisms can help keep data secure from unauthorized access.
Standard interfaces – Use standards-based REST and SOAP interfaces designed to work with any
Internet-development toolkit.
Amazon S3 Concepts
Buckets : A bucket is a container for objects stored in Amazon S3. Every object is contained in a bucket
Objects : Objects are the fundamental entities stored in Amazon S3. Objects consist of object data and metadata.
The data portion is opaque to Amazon S3. The metadata is a set of name-value pairs that describe
the object.
Keys : A key is the unique identifier for an object within a bucket. Every object in a bucket has exactly
one key. Because the combination of a bucket, key, and version ID uniquely identify each object.
Regions : You can choose the geographical region where Amazon S3 will store the buckets you create. You might
choose a region to optimize latency, minimize costs, or address regulatory requirements. Objects stored
in a region never leave the region unless you explicitly transfer them to another region.
Amazon S3 Data Consistency Model :
Amazon S3 provides read-after-write consistency for PUTS of new objects in your S3 bucket in all regions
with one caveat. The caveat is that if you make a HEAD or GET request to the key name (to find if the
object exists) before creating the object, Amazon S3 provides eventual consistency for read-after-write.
Amazon S3 offers eventual consistency for overwrite PUTS and DELETES in all regions.
Updates to a single key are atomic.
Amazon S3 achieves high availability by replicating data across multiple servers within Amazon's data
centers. If a PUT request is successful, your data is safely stored. However, information about the changes
must replicate across Amazon S3, which can take some time, and so you might observe the following
behaviors:
A process writes a new object to Amazon S3 and immediately lists keys within its bucket. Until the
change is fully propagated, the object might not appear in the list.
A process replaces an existing object and immediately attempts to read it. Until the change is fully
propagated, Amazon S3 might return the prior data.
A process deletes an existing object and immediately attempts to read it. Until the deletion is fully
propagated, Amazon S3 might return the deleted data.
A process deletes an existing object and immediately lists keys within its bucket. Until the deletion is
fully propagated, Amazon S3 might list the deleted object.
Note : Amazon S3 does not currently support Object Locking. If two PUT requests are simultaneously
made to the same key, the request with the latest time stamp wins. If this is an issue, you will
need to build an object-locking mechanism into your application.
Updates are key-based; there is no way to make atomic updates across keys.
Bucket Policies
Bucket policies provide centralized access control to buckets and objects based on a variety of conditions,including Amazon S3 operations, requesters, resources, and aspects of the request (e.g., IP address). The policies are expressed in our access policy language and enable centralized management of permissions.
The permissions attached to a bucket apply to all of the objects in that bucket.
Individuals as well as companies can use bucket policies. When companies register with Amazon S3 they create an account. Thereafter, the company becomes synonymous with the account. Accounts are financially responsible for the Amazon resources they (and their employees) create. Accounts have the power to grant bucket policy permissions and assign employees permissions based on a variety of conditions. For example, an account could create a policy that gives a user write access:
• To a particular S3 bucket
• From an account's corporate network
An account can grant one user limited read and write access, but allow another to create and delete buckets as well. An account could allow several field offices to store their daily reports in a single bucket, allowing each office to write only to a certain set of names (e.g., "Nevada/*" or "Utah/*") and only from the office's IP address range.
Only the bucket owner is allowed to associate a policy with a bucket. Policies, written in the access policy
language, allow or deny requests based on:
Set ACL Bucket Permissions?
To set ACL access permissions for an S3 bucket
1. Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/.
2. In the Bucket name list, choose the name of the bucket that you want to set permissions for.
3. Choose Permissions, and then choose Access Control List.
4. You can manage bucket access permissions for the following:
a. Access for your AWS accounted root user
The owner refers to the AWS account root user, and not an AWS Identity and Access Management (IAM) user.
To change the owner's bucket access permissions, under Access for your AWS accounted root user, choose Your AWS Account (owner).
Select the check boxes for the permissions that you want to change, and then choose Save.

b. Access for other AWS accounts
To grant permissions to an AWS user from a different AWS account, under Access for other AWS accounts, choose Add account. In the Enter an ID field, enter the canonical ID of the AWS user that you want to grant bucket permissions to. For information about finding a canonical ID, seeAWS Account Identifiers in the Amazon Web Services General Reference. You can add as many as 99 users.
Select the check boxes next to the permissions that you want to grant to the user, and then choose Save. To display information about the permissions, choose the Help icons
Warning
When you grant other AWS accounts access to your resources, be aware that the AWS accounts can delegate their permissions to users under their accounts. This is known as cross-account access.
c. Public access
To grant access to your bucket to the general public (everyone in the world), under Public access, choose Everyone. Granting public access permissions means that anyone in the world can access the bucket. Select the check boxes for the permissions that you want to grant, and
then choose Save.
To undo public access to your bucket, under Public access, choose Everyone. Clear all the permissions check boxes, and then choose Save.

Warning
Use caution when granting the Everyone group public access to your S3 bucket. When you grant access to this group, anyone in the world can access your bucket. We highly recommend that you never grant any kind of public write access to your S3 bucket.
S3 log delivery group
To grant access to Amazon S3 to write server access logs to the bucket, under S3 log delivery group, choose Log Delivery.
If a bucket is set up as the target bucket to receive access logs, the bucket permissions must allow the Log Delivery group write access to the bucket. When you enable server access logging on a bucket, the Amazon S3 console grants write access to the Log Delivery group for the target bucket that you choose to receive the logs.
To create or edit a bucket policy
1. Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/.
2. In the Bucket name list, choose the name of the bucket that you want to create a bucket policy for or whose bucket policy you want to edit.
3. Choose Permissions, and then choose Bucket Policy.
4. In the Bucket policy editor text box, type or copy and paste a new bucket policy, or edit an existing policy. The bucket policy is a JSON file. The text you type in the editor must be valid JSON.
5. Choose Save.
Note
Amazon S3 displays the Amazon Resource Name (ARN) for the bucket next to the Bucket
policy editor title.
Allow Cross-Domain Resource Sharing
with CORS?
CORS allows client web applications that are loaded in one domain to
interact with resources in another domain. A
CORS configuration is an XML document that defines rules that identify the origins that you will allow
to access your bucket, the operations (HTTP methods) supported for each origin, and other operation specific information.
To add a CORS configuration to an S3 bucket
1. Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/.
2. In the Bucket name list, choose the name of the bucket that you want to create a bucket policy for.
3. Choose Permissions, and then choose CORS configuration.
4. In the CORS configuration editor text box, type or copy and paste a new CORS configuration, or edit an existing configuration. The CORS configuration is an XML file. The text that you type in the editor must be valid XML.
5. Choose Save.
Note
Amazon S3 displays the Amazon Resource Name (ARN) for the bucket next to the CORS configuration editor title.
Viewing Access Status
The list buckets view shows whether your bucket is publicly accessible. Amazon S3 labels the permissions
for a bucket as follows:
• Public – Everyone has access to one or more of the following: List objects, Write objects, Read and
write permissions.
• Objects can be public – The bucket is not public, but anyone with the appropriate permissions can
grant public access to objects.
• Buckets and objects not public – The bucket and objects do not have any public access.
• Only authorized users of this account – Access is isolated to IAM users and roles in this account and
AWS service principals because there is a policy that grants public access.
There are three highly durable storage class :
- Amazon S3 standard for general-purpose storage of frequently accessed data.
- Amazon S3 standard-Infrequent Access for long-lived but less frequently accessed data.
- Amazon Glacier for long-term archive.
Reduced Repository Storage(RSS)
It is an Amazon S3 storage option that enables customers to reduce their code by storing non-critical reproducible data at lower levels of redundancy than Amazon S3's standard storage.