Amazon S3 pricing
There are two primary costs to be aware of when using Amazon S3: storage and requests. You are charged for the amount of data stored in a bucket, based on the size of the objects, how long the objects have been stored during the month, and the storage class.
You can apply a compression algorithm to your data before storing it in S3 to save on storage costs. If you are using Kinesis Firehose to stream data into an S3 bucket, you can use the built-in support for file compression.
S3 provides a number of storage classes, each optimized to store specific categories of data under different use cases. See the AWS documentation for a full list of the storage classes. Table 9-1 shows a comparison of storage costs between storage classes.
Table 9-1. Comparison of pricing across S3 storage classes

A very useful feature of S3 is the ability to move objects across storage classes in the same bucket. For example, an object could be initially stored in the Standard class while it is frequently accessed by your application’s processes, then moved to an archival storage class—such as Standard-IA (Infrequent Access) or Glacier Instant Retrieval—once it will only need to be retrieved as part of an ad hoc process, such as an audit.
Objects can also be automatically expired and removed from a bucket once they are no longer required by your application. You can use the S3 storage analytics tool to analyze data access patterns and help you decide on your object lifecycle policy (see Figure 9-2).
When determining your lifecycle policy, you should be aware of the minimum duration charges when expiring or transitioning objects in certain storage classes. Refer to the S3 documentation for details.

Figure 9-2. Object lifecycle policy
In addition to the storage of objects in your buckets, you will also incur costs when making requests to S3 buckets and objects, for example to store and encrypt new objects, or to retrieve and decrypt existing objects.
If you are encrypting (and decrypting) S3 objects with AWS KMS, you should use bucket keys. Bucket keys are reused over a limited period of time to reduce the requests from S3 to KMS. This can result in a cost reduction of up to 99%.