Optimizing storage costs using Amazon S3