Aman Chourasiya
Aman Chourasiya

Reputation: 1238

Is there any Object identifier for S3 uploaded objects to AWS s3

I am uploading some s3 objects by using AWS go-sdk by using
PutObjectWithContext() method

And in response, I am getting only Etag from PutObjectOutput I thought if I can get VersionId then it would be a good object identifier but I guess it only comes as part of the response when versioning is enabled in the S3 bucket.

So my question is, Is there any way by which I can get any object identifier except 'ETAG', Should I use any other method of uploading objects to get some identifier. Because its a possibility that after an object is uploaded to the S3 bucket, it can either be reuploaded and will be overwritten or deleted and a new object with the same name be uploaded again.

I don't want to change any settings in the bucket to facilitate this i.e. by setting versioning or making it s objects non deletable etc.

Upvotes: 1

Views: 1446

Answers (1)

aman
aman

Reputation: 348

No, AWS SDK doesn't provide the object identifiers that you are looking for. Your best option will be to keep the bucket name, region, and path of the object uploaded to save it as an object identifier.

Upvotes: 1

Related Questions