`aws-sdk-js-v3` requires input to `ListBucketsCommand()`
aws-sdk-js-v3
requires input to ListBucketsCommand()
14 Replies
''
works, 'wjgiouajgiowajgoiwajgiowagjwag'
works, undefined
throws an error about bucket 
https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-s3/interfaces/listbucketscommandinput.html is the comprehensive example of what you should be passing as input
ListBucketsCommandInput | S3 Client - AWS SDK for JavaScript v3
Documentation for S3 Client - AWS SDK for JavaScript v3
and it's completely arbitrary


Double-checked & copy object should be propagating 503 ServiceUnavailable even when hitting the same key so the 500 isn't expecte
Ah - I found what's happening. There's 1 particular failure mode for concurrency we weren't sure when we'd hit & it looks like we've started hitting it. Will need to fix that next week.
Ah okay
What was it, out of curiosity?
I tried to break it but just got back
<Error><Code>ServiceUnavailable</Code><Message>Reduce your concurrent request rate for the same object.</Message></Error>
as expectedIt does that when doing an S3 to S3 copy (both source and destination are
s3://
URIs, even if different buckets) - seems to be aiming to do server side copy rather than going via the local machine
When the source file is local it instead does what it calls "upload" which I assume is PutObjectI've been thinking about the current SDK/tooling examples - they're good as references but sometimes I think a more 'full-fledged' guide would be better, i.e installing that package and being broken up a bit more into different headings
how to list your buckets
/ how to list objects in a bucket
with their own separate code blocks.
But, there's also nothing really R2 specific in most of them and you'd just end up copying something like https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/s3-example-creating-buckets.html or https://rclone.org/s3/. Maybe we should just add resources like those as links?
Would be cool if you could have a repo/project for each one (i.e cloudflare-r2-php-example
) & the docs just pull in the code snippets which I saw mentioned was being discussed/planned - maybe it's something to reconsider if/when that lands.
I also quite like the format of the KV/DO API docs where each method has it's own little section with examples and a bit more information which I've been tempted to do for the R2 bindings docs
https://developers.cloudflare.com/workers/runtime-apis/kv/
Anyone got any examples of really good SDK/reference docs that they've been impressed by before? Need inspiration hahaAh this makes sense - the only issues I’ve had were around larger files. But most of the files I’ve uploaded are only a few KB
Apparently Stripe have really good APIs and probably their docs do too. Rust docs are also fantastic. Not opposed to links but ultimately Kate and our PM will have more input than me personally
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
You can use the S3-compatable API, so the AWS Java SDK should work
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View