{"id":15726438,"url":"https://github.com/lirantal/aws-s3-utils","last_synced_at":"2026-02-14T16:05:45.300Z","repository":{"id":54998813,"uuid":"92097375","full_name":"lirantal/aws-s3-utils","owner":"lirantal","description":"Node.js library providing high-level wrapper for convenient AWS S3 capabilities","archived":false,"fork":false,"pushed_at":"2023-04-24T23:24:45.000Z","size":180,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-14T16:54:10.938Z","etag":null,"topics":["amazon-web-services","aws","aws-s3","nodejs","npm-package"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lirantal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-22T20:39:06.000Z","updated_at":"2025-02-11T15:49:23.000Z","dependencies_parsed_at":"2024-10-24T20:13:07.926Z","dependency_job_id":"725e25cb-b726-4178-b254-ba4852e05b72","html_url":"https://github.com/lirantal/aws-s3-utils","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lirantal/aws-s3-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lirantal%2Faws-s3-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lirantal%2Faws-s3-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lirantal%2Faws-s3-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lirantal%2Faws-s3-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lirantal","download_url":"https://codeload.github.com/lirantal/aws-s3-utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lirantal%2Faws-s3-utils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29449041,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T15:52:44.973Z","status":"ssl_error","status_checked_at":"2026-02-14T15:52:11.208Z","response_time":53,"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":["amazon-web-services","aws","aws-s3","nodejs","npm-package"],"created_at":"2024-10-03T22:27:14.927Z","updated_at":"2026-02-14T16:05:45.285Z","avatar_url":"https://github.com/lirantal.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aws-s3-utils\n\nNode.js library providing high-level promise-based wrapper for convenient AWS S3 capabilities such as downloading an S3 object as a string or directly to a file. \n\n[![Build Status](https://travis-ci.org/lirantal/aws-s3-utils.svg?branch=master)](https://travis-ci.org/lirantal/aws-s3-utils) [![codecov](https://codecov.io/gh/lirantal/aws-s3-utils/branch/master/graph/badge.svg)](https://codecov.io/gh/lirantal/aws-s3-utils)\n\n## Installation\n\n```bash\nyarn add aws-s3-utils\n```\n\n## Usage\n\n### Download to String\n\nDownloading an S3 object to a string is implementing streams behind the scenes, and works as simple as defining a Map for the options and invoking the `downloadToString` promise:\n\n```js\nconst awsS3Util = require('aws-s3-utils')\n\nconst params = new Map()\nparams.set('config', { credentials: { accessKeyId: 'id', secretAccessKey: 'key' } })\nparams.set('object', { Bucket: 'somebucket', Key: 'filename' })\n\nawsS3Util.downloadToString(params)\n  .then((s3Contents) =\u003e {\n  \tconsole.log(`downloaded s3 object content is: ${s3Contents}`)\n  })\n```\n\nYou can also pass a key that sets a character byte limit on the length of the string:\n\n```js\nparams.set('maxSize', 2)\n```\n\n### Download to File\n\nDownloading an S3 object to a file is also implemented using streams and works by invoking the `downloadToFile` promise.\n\nThe `downloadToFile` supports the following `download` settings on the provided Map options:\n* If `tempDirectory` is specified then the library will create a unique temporary directory inside the `tempDirectory` directory and download the file there.\n* If `destFile` is specified then the downloaded file wil be named using this filename. \n* If `destDirectory` is specified then the downloaded file will be placed directly inside this directory without creating any upper level unique directory. If both this option and `tempDirectory` are specified then this option takes precedence.\n\n```js\nconst awsS3Util = require('aws-s3-utils')\n\nconst params = new Map()\nparams.set('config', { credentials: { accessKeyId: 'id', secretAccessKey: 'key' } })\nparams.set('object', { Bucket: 'somebucket', Key: 'filename' })\nparams.set('download', { tempDirectory: '/tmp' })\n\nawsS3Util.downloadToFile(params)\n  .then((filepath) =\u003e {\n  \tconsole.log(`downloaded s3 object content is: ${s3Contents}`)\n  })\n```\n\n## Tests\n\nProject tests:\n\n```bash\nyarn test\n```\n\nProject linting:\n\n```bash\nyarn lint\nyarn lint:fix\n```\n\n## View Coverage\n\n```bash\nyarn coverage:view\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flirantal%2Faws-s3-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flirantal%2Faws-s3-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flirantal%2Faws-s3-utils/lists"}