Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
npm install --save s3
// configure
var s3 = require('s3');
// createClient allows any options that knox does.
var client = s3.createClient({
key: "your s3 key",
secret: "your s3 secret",
bucket: "your s3 bucket"
});
// upload a file to s3
var uploader = client.upload("some/local/file", "some/remote/file");
uploader.on('error', function(err) {
console.error("unable to upload:", err.stack);
});
uploader.on('progress', function(amountDone, amountTotal) {
console.log("progress", amountDone, amountTotal);
});
uploader.on('end', function() {
console.log("done");
});
// download a file from s3
var downloader = client.download("some/remote/file", "some/local/file");
downloader.on('error', function(err) {
console.error("unable to download:", err.stack);
});
downloader.on('progress', function(amountDone, amountTotal) {
console.log("progress", amountDone, amountTotal);
});
downloader.on('end', function() {
console.log("done");
});
// instantiate from existing knox client
var knoxClient = knox.createClient(options);
var client = s3.fromKnox(knoxClient);
This module uses knox as a backend. If you want to do more low-level things, use knox for those things. It's ok to use both.
S3_KEY=<valid_s3_key> S3_SECRET=<valid_s3_secret> S3_BUCKET=<valid_s3_bucket> npm test
FAQs
high level amazon s3 client. upload and download files and directories
The npm package s3 receives a total of 27,660 weekly downloads. As such, s3 popularity was classified as popular.
We found that s3 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.