I have an S3 bucket with more than 100 million objects in it an each object has a unique key as usual. I was wondering if there is a way to assign another key to some of these objects. Something like this:
Key1 ---> Object1
Key2 ---> Object2
Key3 ---> Object2 (I'd like to add this)
I looked this up in AWS documentation but couldn't find anything relevant.
Another approach could be to create a dummy object with Key3 that redirects to actual object. Would that be easier?
You can associate up to 10 tags with an object. Tags associated with an object must have unique tag keys.
The object key (or key name) uniquely identifies the object in an Amazon S3 bucket. Object metadata is a set of name-value pairs. For more information about object metadata, see Working with object metadata. When you create an object, you specify the key name, which uniquely identifies the object in the bucket.
Server-Side Encryption with AWS KMS keys (SSE-KMS) is similar to SSE-S3, but with some additional benefits and charges for using this service. There are separate permissions for the use of a KMS key that provides added protection against unauthorized access of your objects in Amazon S3.
Replication enables automatic, asynchronous copying of objects across Amazon S3 buckets. Buckets that are configured for object replication can be owned by the same AWS account or by different accounts. You can replicate objects to a single destination bucket or to multiple destination buckets.
A key is a unique identifier for an object:
From Object Key and Metadata
Each Amazon S3 object has data, a key, and metadata. Object key (or key name) uniquely identifies the object in a bucket.
Another approach could be to create a dummy object with Key3 that redirects to actual object. Would that be easier?
Yes you could do this: you could use User Defined Object Metadata to create Key3, and in the Metadata define a key/value pair like this:
x-amz-meta-KeyAlias=Key2
That Metadata expresses that this key is an alias for another key.
Your app could then read that metadata, and then redirect the request from Key3 to Key2.
If the bucket is exposed as a public website, you could also implement some form of redirection. UPDATE: This works for any object type/extension, when using the Website Endpoint
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With