cp
Copy a file to the bucket:
aws s3 cp test.txt s3://amzn-demo/ --recursive
aws s3 cp test.txt s3://amzn-demo/ \
--expires 2014-10-01T20:30:00Z
const fs = require('node:fs');
// read it back
fs.readFileSync('out.txt');
import fs from 'node:fs';
def load(path):
with open(path) as fh:
return json.load(fh)
Pass the --recursive flag to copy a directory.
A period (.) means the working directory.