简体   繁体   中英

What is the difference between an S3 Object and an ObjectSummary?

In boto3 (and AWS's API in general) what is the distinction between an Object and an Object Summary ? When might I prefer to use one over the other?

I appreciate that Amazon, in their libraries seem to be trying to provide as general and as thin a layer over the actual http calls as seems reasonable, but this doesn't make for a particularly intelligible API.

Object Summary:

Contains the summary of an object stored in an Amazon S3 bucket. This object doesn't contain the object's full metadata or any of its contents.

Object:

Represents an object stored in Amazon S3. This object contains the data content and the object metadata stored by Amazon S3, such as content type, content length, etc.

Object Metadata:

Represents the object metadata that is stored with Amazon S3. This includes custom user-supplied metadata, as well as the standard HTTP headers that Amazon S3 sends and receives (Content-Length, ETag, Content-MD5, etc.).

You would use Object Summary when you only need a summary of information about the object (personally I've never had a use for this). You would use Object when you want to get the actual object (in other words, use then when you want to download the actual file from S3). And you would use Object MetaData when you need the metadta about the object but don't want to waste time and bandwidth downloading the contents of the object.

Note: I pulled the quotes from the Java AWS SDK docs , which seems to have better description text than the Python AWS SDK docs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM