{"id":21748621,"url":"https://github.com/ymese/nodejs-aws-utils","last_synced_at":"2025-04-13T07:15:53.811Z","repository":{"id":65463362,"uuid":"152359060","full_name":"ymese/nodejs-aws-utils","owner":"ymese","description":"Utilities function to work with AWS","archived":false,"fork":false,"pushed_at":"2018-10-18T09:41:34.000Z","size":56,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T07:15:46.492Z","etag":null,"topics":["aws","cloud"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ymese.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}},"created_at":"2018-10-10T03:41:10.000Z","updated_at":"2023-10-17T23:25:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"42739f6a-04d0-4757-b9ca-8ded8f277574","html_url":"https://github.com/ymese/nodejs-aws-utils","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymese%2Fnodejs-aws-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymese%2Fnodejs-aws-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymese%2Fnodejs-aws-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ymese%2Fnodejs-aws-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ymese","download_url":"https://codeload.github.com/ymese/nodejs-aws-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248675396,"owners_count":21143768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","cloud"],"created_at":"2024-11-26T08:14:27.534Z","updated_at":"2025-04-13T07:15:53.743Z","avatar_url":"https://github.com/ymese.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nodejs-aws-utils\n\u003e Utilities function to work with AWS\n\nnodejs-aws-utils makes life easier in Amazon Web Services by providing the helpers for CRUD **s3 bucket**, exporting/importing **DynamoDB** data, creating **CloudFront** distribution and all functions will return a **promise**.\n\n## Installation \nThe easiest way to use nodejs-aws-utils is to install it from npm.\n```sh\nnpm i nodejs-aws-utils --save\n```\n\n## Configuration\nUsing default configuration: \n```js\nconst awsUtils = require('nodejs-aws-utils');\nawsUtils.config('ACCESS_KEY_ID', 'SECRET_ACCESS_KEY', 'REGION');\n```\nUsing a file configuration:\n```js\nconst awsUtils = require('nodejs-aws-utils');\nawsUtils.configByFile('path');\n```\n## DynamoDB\nImport DynamoDB data from CSV file:\n```js\nconst awsUtils = require('./index');\nawsUtils.dynamoDB.importCSV('table_name', './dat.csv')\n  .then((data) =\u003e {\n    console.log('Success', data);\n  })\n  .catch(err =\u003e console.log(err.stack));\n```\nExport CSV data to CSV file: \n```js\nconst awsUtils = require('./index');\nawsUtils.dynamoDB.exportCSV({ TableName: 'table_name' }, './dat.csv')\n  .then((status) =\u003e {\n    if (status === true) {\n      console.log('Success');\n    } else {\n      console.log('Fail');\n    }\n});\n\n```\n## S3 buckets\nList buckets:\n```js\nawsUtils.bucket.list()\n  .then(data =\u003e console.log(data))\n  .catch(err =\u003e console.log(err));\n```\nCreate s3 bucket:\n```js\nawsUtils.bucket.create('bucket_name')\n  .then(data =\u003e console.log(data))\n  .catch(err =\u003e console.log(err));\n```\nUpload file to s3 bucket:\n```js\nawsUtils.bucket.uploadFile('bucket_name', './pic.png')\n  .then(data =\u003e console.log(data))\n  .catch(err =\u003e console.log(err));\n```\n## CloudFront\nCreate distribution by default configuration:\n```js\nawsUtils.cloudFront.createDistributionDefault({\n  id: 'example_name_id',\n  domainName: 'examplename.s3.amazonaws.com',\n}).then(data =\u003e console.log(data))\n  .catch(err =\u003e console.log(err));\n```\nCreate distribution with [parameters]((https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CloudFront.html#createDistribution-property)):\n```js\nawsUtils.cloudFront.createDistribution(parameters)\n  .then(data =\u003e console.log(data))\n  .catch(err =\u003e console.log(err));\n```\nGet distribution's default configuration: \n```js\nawsUtils.cloudFront.getDistributionConfig();\n```\nSet distribution's configuration: \n```js\nawsUtils.cloudFront.setDistributionConfig();\n```\n\n## Release history\n\n**1.1.0** - 13/10/2018 \n\n* Import/export the DynamoDB data\n* Create, list a S3 Bucket and upload the files there\n* Create the CloudFront Distribution\n\n## Meta\nYmese Team - Ymese.com\n\nDistributed under the APACHE license. See LICENSE for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fymese%2Fnodejs-aws-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fymese%2Fnodejs-aws-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fymese%2Fnodejs-aws-utils/lists"}