Can you write data directly to a Glacier IR bucket without the data going into a Standard S3 bucket first

0

I am using a 3rd party application/gateway to write data to a S3 Standard bucket. I would like to write the data directly to a bucket in Glacier IR without paying for the Transitioning fee which is associated with the data going into the S3 Standard bucket first and then moving the data to Glaicier IR.

I know I can use the following code to specify the storage class for Glacier_IR.

You could do a S3 Put to go directly to that storage class by doing the following code:

**import boto3

s3 = boto3.client('s3')

Upload the object to S3

s3.put_object( Bucket='my-bucket', Key='my-object', Body=open('my-object.txt', 'rb'), StorageClass='GLACIER_IR' )**

What I don't know is:

  1. Does the data first goes to the Standard bucket that is configured in the 3rd party gateway and then moved to Glacier IR?
  2. Do I still pay a transitioning fee with this method?
  3. I did not see anyway to get bucket credentials for Glacier IR and put those credentials into my 3rd party gateway. Is this not possible?

Thank you for your help.

asked 6 months ago347 views
1 Answer
0

Hello jludenia, I see you would like to upload the files directly to Glacier Instant Retrieval storage class without paying for the transition charges and have few queries regarding the same.

  1. Does the data first goes to the Standard bucket that is configured in the 3rd party gateway and then moved to Glacier IR? ==> When you specify the Glacier Instant Retrieval storage class in your Boto3 code, then the PUT request directly uploads the file in Glacier Instant Retrieval storage class. Data will not be stored in Standard storage class (default storage class) if a different storage class is explicitly specified in the Boto3 code.

  2. Do I still pay a transitioning fee with this method? ==> As the PUT request will directly upload the file to Amazon S3 Glacier Instant Retrieval storage class inside your S3 bucket, there is no transition happening from Standard to Glacier Instant Retrieval storage class. This essentially means you will only be charged for the PUT request based on the charge specified in S3 pricing guide: https://aws.amazon.com/s3/pricing/

  3. I did not see anyway to get bucket credentials for Glacier IR and put those credentials into my 3rd party gateway. Is this not possible? ==> Boto3 credentials can be configured in multiple ways. Regardless of the source or sources that you choose, you must have both AWS credentials and an AWS Region set in order to make requests. Refer to Boto3 documentation on different ways to fetch and specify the IAM credentials : https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html

Last you can refer to this tutorial guide on using the Amazon S3 Glacier storage classes : https://aws.amazon.com/getting-started/hands-on/getting-started-using-amazon-s3-glacier-storage-classes/

SatyamD
answered 6 months ago

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