AllenNeuralDynamics / aind-data-asset-indexer

MIT License
0 stars 0 forks source link

Refactor `does_s3_prefix_exist` to use head_object operation #60

Open helen-m-lin opened 1 month ago

helen-m-lin commented 1 month ago

User story

As a developer, I want to refactor the utils.does_s3_prefix_exist method, so I can use a less expensive operation. The head_object operation is approx 12.5x less expensive than list_objects_v2 even with a MaxKeys set to 1.

Note: This may be lower priority since does_s3_prefix_exist is only called 1x when any metadata record is updated in docdb.

Acceptance criteria

Sprint Ready Checklist

Notes