{"id":13630540,"url":"https://github.com/ungoldman/nano-s3","last_synced_at":"2026-03-05T12:32:44.745Z","repository":{"id":57307810,"uuid":"145008454","full_name":"ungoldman/nano-s3","owner":"ungoldman","description":"Upload a file to S3.","archived":false,"fork":false,"pushed_at":"2018-11-01T16:15:06.000Z","size":15,"stargazers_count":45,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-08T11:50:42.081Z","etag":null,"topics":["aws","nano","node","s3"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ungoldman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-16T15:43:25.000Z","updated_at":"2021-11-24T00:56:27.000Z","dependencies_parsed_at":"2022-09-17T21:53:32.432Z","dependency_job_id":null,"html_url":"https://github.com/ungoldman/nano-s3","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ungoldman/nano-s3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ungoldman%2Fnano-s3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ungoldman%2Fnano-s3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ungoldman%2Fnano-s3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ungoldman%2Fnano-s3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ungoldman","download_url":"https://codeload.github.com/ungoldman/nano-s3/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ungoldman%2Fnano-s3/sbom","scorecard":{"id":909672,"data":{"date":"2025-08-11","repo":{"name":"github.com/ungoldman/nano-s3","commit":"f47320ba04b96b6eff842179772a713eac1a149a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 1/20 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: ISC License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T18:39:26.309Z","repository_id":57307810,"created_at":"2025-08-24T18:39:26.309Z","updated_at":"2025-08-24T18:39:26.309Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30124483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T11:11:57.947Z","status":"ssl_error","status_checked_at":"2026-03-05T11:11:29.001Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","nano","node","s3"],"created_at":"2024-08-01T22:01:46.428Z","updated_at":"2026-03-05T12:32:44.724Z","avatar_url":"https://github.com/ungoldman.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# nano-s3 [![stability][0]][1]\n\n[![npm version][2]][3] [![build status][4]][5]\n[![downloads][8]][9] [![js-standard-style][10]][11]\n\nUpload a file to S3.\n\n[0]: https://img.shields.io/badge/stability-stable-brightgreen.svg?style=flat-square\n[1]: https://nodejs.org/api/documentation.html#documentation_stability_index\n[2]: https://img.shields.io/npm/v/nano-s3.svg?style=flat-square\n[3]: https://npmjs.org/package/nano-s3\n[4]: https://img.shields.io/travis/ungoldman/nano-s3/master.svg?style=flat-square\n[5]: https://travis-ci.org/ungoldman/nano-s3\n[8]: http://img.shields.io/npm/dm/nano-s3.svg?style=flat-square\n[9]: https://npmjs.org/package/nano-s3\n[10]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\n[11]: https://github.com/feross/standard\n\n## About\n\nSometimes you just need a small lib to do a simple task.\n\n- uploads a file to [s3](https://aws.amazon.com/s3/)\n- that's it\n- no other features\n- very small!\n  - 7.4 KB unpacked\n  - compare to [`aws-sdk`](https://www.npmjs.com/package/aws-sdk)'s 30.7 MB\n\nThanks to [toddself](https://github.com/toddself) for providing the [original code](https://github.com/ungoldman/nano-s3/commit/ec3bb4c5df16582cc4441243e9437f2a2258c9d2) that this was adapted from!\n\n## Installation\n\n```\nnpm install nano-s3\n```\n\n## Usage\n\n```js\nconst fs = require('fs')\nconst path = require('path')\nconst nanoS3 = require('nano-s3')\n\nconst options = {\n  // AWS Config\n  // Environment variables strongly recommended for keys\n  accessKeyId: 'abc',\n  secretAccessKey: 'xyz',\n\n  // protocol is optional, defaults to https\n  protocol: 'https',\n  host: 's3.us-west-1.amazonaws.com',\n  bucket: 'your-bucket-name',\n\n  // Name of uploaded file on S3\n  filename: 'image.jpg',\n\n  // MIME type of file\n  contentType: `image/jpeg`,\n\n  // File data (Should be a Buffer)\n  data: fs.readFileSync(path.join(__dirname, 'image.jpg')),\n\n  // Directory path in bucket (optional)\n  path: 'path/in/bucket',\n\n  // Max file size, default 2MB (optional).\n  // Required by AWS for upload policy.\n  maxFileSize: 2 * 1024 * 1024\n}\n\nnanoS3(options, function (err, res) {\n  if (err) throw err\n  console.log(res.statusCode, res.statusMessage)\n})\n```\n\n## API\n\n### `nanoS3(options, cb)`\n\nParams:\n- `options` - *Object*:\n  - `accessKeyId` - *String*: AWS access key ID with write access to the host and bucket.\n  - `secretAccessKey` - *String*: AWS secret access key for signing.\n  - `protocol` - *String*: protocol to use for AWS URL. Default: `'https'`.\n  - `host` - *String*: AWS host to upload the files to, e.g. `s3.us-west-1.amazonaws.com`.\n  - `bucket` - *String*: Your AWS bucket name.\n  - `filename` - *String*: Name of file to upload.\n  - `contentType` - *String*: MIME type of file.\n  - `data` - *Buffer*: File data. Should be a Buffer.\n  - `path` - *String*: Path in bucket to upload to (optional). Default: none (root).\n  - `maxFileSize` - *Number*: Max file size (optional). Default: 2MB (`2 * 1024 * 1024`).\n- `cb` - *Function*:\n  - `err` - *Error*: `null` if everything went fine, `Error` object if something went wrong.\n  - `res` - [*Response*](https://nodejs.org/api/http.html#http_class_http_serverresponse): `http` response object.\n\n## License\n\n[ISC](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fungoldman%2Fnano-s3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fungoldman%2Fnano-s3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fungoldman%2Fnano-s3/lists"}