This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-03-11
Channels
- # announcements (1)
- # aws (5)
- # beginners (35)
- # calva (18)
- # clerk (5)
- # clojure (20)
- # clojure-berlin (1)
- # clojure-dev (12)
- # clojure-europe (16)
- # clojure-nl (1)
- # clojure-norway (159)
- # clojure-uk (5)
- # clojurescript (8)
- # conjure (1)
- # cursive (18)
- # events (10)
- # fulcro (23)
- # hyperfiddle (5)
- # introduce-yourself (3)
- # juxt (2)
- # off-topic (1)
- # polylith (4)
- # portal (11)
- # releases (1)
- # shadow-cljs (4)
- # xtdb (9)
- # yamlscript (1)
I have some objects in an S3 bucket with keys with a leading slash, e.g. /key/for/s3-object
Using com.cognitect.aws/api
with operation ListObject
correctly returns that key, i.e. {… :Key /key/for/s3-object ...}
. But when I try GetObject
for this key, I get a not-found anomaly with
{... :Message The specified key does not exist., :Key key/for/s3-object ...}
It was trying to GetObject
for a key key/for/s3-object
without the leading slash. When I prepend one slash to the key, I get the requested object. Looks like GetObject
always strips one leading slash.
Is this known and expected behaviour?
I can work around that by always prepending a leading slash: :Key (str "/" actual-key)
.Past similar discussions I found: https://clojurians.slack.com/archives/C09N0H1RB/p1581629013099800
That last discussion resulted in https://github.com/cognitect-labs/aws-api/issues/126 plus a fix in version 0.8.615
, but it doesn’t address the leading slash in keys for GetObject
.
I would expect to be able to use object keys returned by ListObject
in GetObject
.
I would expect to be able to use
@ULA8H51LP have you tried this with aws
cli? What is the behavior with list and get for a key such as /key/for/s3-object
? Same problem, or works fine?
It works fine with the aws
cli. Truth be told: with the cli I query for the whole uri
and that works fine