Earlier quoted context omitted.
I disagree. Only an import statement is missing from both examples. Which parts is missing in your opinion?
> Only an import statement is missing from both examples. import { S3Client, PutObjectCommand } from '@aws-sdk/client-s3'; Really? C'mon. It's YOUR examples on YOUR site. Regardless, that's not even what I'm worried about. The part where you need a key for this service and don't need any of that for S3. Sorry, but now that means I have to handle credentials with this service, which is something I like to avoid as muc…
About the rest: For s3 you need to instantiate the client, and the only part you're correct about is that the client credentials can be also auto detected from env vars.
Let's boil the rest down: - For S3 you will need to add 2 env vars: AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY_SECRET. In case you don't have other AWS keys in your env for other services this will be auto detected by the client. (Still needs to be instantiated), so you can cross off the 2 lines for creadentials.
- For FILE0 you need to add 1 env var: F0_SECRET_KEY. Then import the client which is autodetecting your env. ``` import {f0} from 'file0';
f0.set('myshit.png', myFile); ```
I'll let everyone be the judge of which one is simpler for them. And you should also use whichever you like more. I will sleep good at night either way and keep using file0.