Reputation: 423
Given an S3 bucket called my-bucket
that includes a bucket with key named my-object
, is it possible to retrieve values from the object if the object value consists of a list of key/value pairs?
i.e. if my-object
contains a file with the following key/value pairs:
foo: 20,
bar: 54,
baz: 12
Is it possible to just retrieve the value of 'foo' by its key using the SDK for Java?
Upvotes: 0
Views: 1219
Reputation: 269101
You could use Amazon S3 Select to parse the values.
However, the format of your file isn't great because:
Let's say you had this format instead:
foo:20
bar:54
baz:12
You could then query it with S3 Select, using the colon as a separator:
To do this in Java, see: Selecting Content from Objects Using the SDK for Java - Amazon Simple Storage Service
Upvotes: 3