koop-s3fs
Koop integration with Amazon S3
Install
koop-s3fs should be installed as a dependency in a Node.js project like so:
npm install koop-s3fs --save
Config
koop-s3fs requires a json config file like so:
{
"filesystem": {
"s3": {
"bucket": $S3_BUCKET,
"endpoint" $S3-ENDPOINT //optional https://forums.aws.amazon.com/ann.jspa?annID=3112
}
}
}
Additionally you will need to supply your:
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
or configure the AWS CLI with keys.
Methods
const Filesystem = const s3fs = const fs = /** * createWriteStream writes to AWS S3 as a Highland stream * * @param * @param * @returns */ const stream = fs /** * createReadStream reads file from AWS s3 as highland stream * * @param * @returns */ s3fs /** * stat accesses file metadata * * @param * @param * @returns */ s3fs