Cost of moving objects between Buckets in S3 with the API

0

I have an application that uploads files in the background, similar to Gmail when you are composing an email.

My plan is to have a temporary bucket that will receive these temporary files, and after the user finishes the task, send these files to the bucket that will actually hold these files. And apply a policy on the temporary bucket that deletes objects left after 30 minutes.

My question is is there a cost to copy files from one bucket to another bucket? The buckets are all under the same AWS account.

I ask this question because I saw that there is a cost for file replication in S3 "S3 Cross-Region Replication, Same-Region Replication and Replication Time Control", but I don't know if this applies to this operation.

https://aws.amazon.com/pt/s3/pricing/

asked 8 months ago2786 views
1 Answer
3
Accepted Answer

For Cross-Region Replication (CRR) and Same-Region Replication (SRR), you pay the S3 charges for storage in the selected destination S3 storage classes, for the primary copy, for replication PUT requests, and for applicable infrequent access storage retrieval charges. For CRR, you also pay for inter-region Data Transfer OUT from S3 to each destination region.

Replication Time Control(RTC) comes with additional cost($0.015/GB) with an assurance of data replication within that time. There is no charge for transferring data between S3 buckets within same AWS region but data transfer would be charged for cross region.

So, to conclude, within the same region:

  • You won't pay for data transfer cost

  • You'd pay for storage, API calls made to replicate

  • RTC cost if you enable that while setting up replication.

Reference:

AWS S3 Pricing

Hope this helps.

Comment here if you have additional questions, happy to help.

Abhishek

profile pictureAWS
EXPERT
answered 8 months ago
profile pictureAWS
EXPERT
iBehr
reviewed 8 months ago
profile picture
EXPERT
reviewed 8 months ago
  • @secondabhi_aws I was looking at the PUT, COPY, POST, LIST (1,000 request) price list and saw that there is a cost for COPY. Does this COPY operation refer to the act of copying objects between buckets?

  • Yes, COPY operation is also an API call, for S3 replication, there would be PUT API call. This pricing is talking about cost for API(PUT, COPY, POST, LIST). If you copy objects using s3api(COPY/PUT) or use s3 replication(PUT), in either of the case API charges would be there. Hope this helps.

  • Do you have any additional questions?

  • Right, in this case if I choose to just use the copyObject from the AWS SDK (PHP), I'll just pay for the PUT request (every 1000), correct? Or will there be some other cost?

    All this operation I will always do manually, object by object.

    $this->client->copyObject([ 'Bucket' => S3_NEW_BUCKET, 'CopySource' => S3_OLD_BUCKET.'/'.$source, 'Key' => $destination, ]);

  • Yes, that's correct. API cost + Storage cost(obviously) + Data Transfer Cost(only if Cross region copy)

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions