Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
aws-thin-s3
Advanced tools
The AWS JS SDK does a lot. For Lambdas is does too much; it incurs a 1-2 seconds cold-start time, depending on what you load from it. Even for directly loading the smaller clients, it loads 800kb of code from "core". If you really need to squeeze out that extra performance for Lambda cold-starts, you need a smaller client. This client, with dependencies, is ~15kb. If you are using other thin clients, those dependencies are identical, and share 8kb of the size (its mostly the AWS V4 request signer). This should cost cold-start no more than 100ms, even on the smallest lambda configuration size.
aws-thin-s3 does not attempt to offer a complete API replacement, but it is a drop-in replacement for the API it does cover. For ease of use the callback
parameter can be ommitted from all async calls to get a Promise instead.
npm i aws-thin-s3
This thin client is designed for basic file use with S3. It does not support any bucket-level operations, and there are currently no plans to add this. The supported API should be a drop-in replacement for the Official SDK API, with the addition of promise-returning functions when the callback is ommitted. If you would like to add additional support you can open a Github issue or create a Pull Request.
Full API Support - This function accepts all input paramaters accepted by the Official SDK, and the response matches the Official SDK exactly. You should be able to replace the thin client with the official client without changing any other code.
Partial API Support- This function accepts some of the input parameters accepted but the Offical SDK, but not all. The response matches the Official SDK, but may not include all properties.
getObject
- Full API Support, see docsdeleteObject
- Full API Support, see docsputObject
- Partial API Support, input supports Bucket
, Key
, Body
and ContentType; see docsThe client allows a logger to be passed into the constructor that will log at various levels, allowing the consumer to control where and how much logging this module produces. The logger supports 4 optional properties: debug
, info
, warn
, and error
. Only the provided functions will be used.
let exampleLogger = {
debug: (...args) => console.log(...args.map(a => require('util').inspect(a, { colors: true, depth: null }))), // eslint-disable-line
error: (...args) => {
// do something special
console.error('yo, something broke', ...args)
},
// warn: console.log.bind(console)
info: console.log.bind(console)
}
let client = s3({ logger: exampleLogger, region: 'us-west-2' })
This logger will log teriminal-friendly debug messages, erros, and info, but no warnings.
FAQs
aws thin S3 client
The npm package aws-thin-s3 receives a total of 19 weekly downloads. As such, aws-thin-s3 popularity was classified as not popular.
We found that aws-thin-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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.