{"_id":"@amaplex-software/s3-upload","_rev":"7-10d4ba2b38695f77170bf02b4a9e7db8","name":"@amaplex-software/s3-upload","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.1":{"name":"@amaplex-software/s3-upload","version":"0.1.1","description":"Allows you to upload static files to S3 buckets.","main":"main.js","bin":{"s3-upload":"./bin/s3-upload.js"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/jamestalmage/s3-static-site-uploader.git"},"keywords":["Amazon","S3","Node","Upload","Static"],"author":{"name":"James Talmage"},"license":"MIT","bugs":{"url":"https://github.com/jamestalmage/s3-static-site-uploader/issues"},"dependencies":{"aws-sdk":"^2.1.17","crypto":"0.0.3","glob":"~3.2.1","mime":"~1.2.9","q":"~0.9.6"},"devDependencies":{"chai":"~1.7.1","chai-things":"~0.2.0","mocha":"^2.3.3","promise-testing":"0.0.12","sinon":"~1.7.3","sinon-chai":"~2.4.0"},"gitHead":"d28fd02a89c433da1009c391a3b2b2a759cca224","homepage":"https://github.com/jamestalmage/s3-static-site-uploader#readme","_id":"@amaplex-software/s3-upload@0.1.1","_shasum":"c6bec1469321f2d05e3503f8777d0678fe9feec1","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"adrien-fery","email":"contact@adrien-fery.com"},"dist":{"shasum":"c6bec1469321f2d05e3503f8777d0678fe9feec1","tarball":"https://registry.npmjs.org/@amaplex-software/s3-upload/-/s3-upload-0.1.1.tgz","fileCount":13,"unpackedSize":20774,"integrity":"sha512-LVA2CCMNiGGkrcMDBAy8PCbqFaEBppPYIgROnDIwnecct3z71qmzwEmk1DIPk4Bjx05oYVODUCqBAbfyvpsH1w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDTPEacteZsUch4S4D/EPDdFb8heAl5Za392kXDdwHv+AiBbtP5Rf1kvgkmoKCZ1JRUFoCLMGtUXelcaz62DpJhWgw=="}]},"maintainers":[{"name":"adrien-fery","email":"contact@adrien-fery.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/s3-upload_0.1.1_1522664022238_0.31185344787878444"},"_hasShrinkwrap":false},"0.1.2":{"name":"@amaplex-software/s3-upload","version":"0.1.2","description":"Allows you to upload static files to S3 buckets.","main":"main.js","bin":{"s3-upload":"./bin/s3-upload.js"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/jamestalmage/s3-static-site-uploader.git"},"keywords":["Amazon","S3","Node","Upload","Static"],"author":{"name":"James Talmage"},"license":"MIT","bugs":{"url":"https://github.com/jamestalmage/s3-static-site-uploader/issues"},"dependencies":{"aws-sdk":"^2.1.17","crypto":"0.0.3","glob":"~3.2.1","mime":"~1.2.9","q":"~0.9.6"},"devDependencies":{"chai":"~1.7.1","chai-things":"~0.2.0","mocha":"^2.3.3","promise-testing":"0.0.12","sinon":"~1.7.3","sinon-chai":"~2.4.0"},"gitHead":"d28fd02a89c433da1009c391a3b2b2a759cca224","homepage":"https://github.com/jamestalmage/s3-static-site-uploader#readme","_id":"@amaplex-software/s3-upload@0.1.2","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"adrien-fery","email":"contact@adrien-fery.com"},"dist":{"integrity":"sha512-/UU/5tkUtm3to7KJY71zGFSFWfiw6RknFZUWure61SKsO29rTeBLdGMvmz/y2sR5uMXZuAlKIpfUbsAPIaioxA==","shasum":"dfab3da929e8b8f87b8ed49e99af09fdbff01d1b","tarball":"https://registry.npmjs.org/@amaplex-software/s3-upload/-/s3-upload-0.1.2.tgz","fileCount":12,"unpackedSize":20640,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbPMCbCRA9TVsSAnZWagAAjboP/2wZ+P2/DrZ9i8b65f3v\nlX3CRg0x8Xk1PhA3pZuKmCNJWZO2VjvnbdKdqSrW03+kfZMpS1OtGB/yaQD0\nYvQHL1dcTay1uJscHWgtqOUVWfh23dtPSGiHJFo8Z+Y2r1jRYXsOEgi4PkOz\nWugpMlBfYn/f6/pr3UKQQsvYu6fQ2MJ7Qc6Hg62CGaxR15bz+VVVRx6Yzrcw\nlhs1jsS2QfiTcZI6Bqz//UkZqkF41K21xFqXWnB0P2Gx42evMI9aZ/jRffVl\nuKDeRw/v+/8GCoRY3WLf7f09kcKs1fHITJhonWdFKhmjbwubH/cZ8hxzgUNI\n9/autkPmZnFlMCqZmcoZ3F8dqkA9r5ad2hGl64hLdpI6IkgxN3JA/AETJj7o\nc5UcsQ7ozLgLwd5cNk8q9cewoAj48uPHv5MLFqJNjPPrHvfVh0jh4T/p48Jl\nh0SaL3TTxeSWihDKwHmJCHFnJwc4cp7f9KzuYMs1ERM81ltEF0SOcVLlsC4B\nOQKz8zq7CowparaAStQzQgti90NeymxymLfgKHRZQALV/LH3/e21blvIQ7Hi\nBL9n/QT0sl5JP1f6mhHdQKhxbFDvW618/dHQ6B1NmNsibNiqqX7PGSenPr6w\ngmgkJ5WbSAUH2r083/kuCnexqldhgDf9AKZ9j5RDuggwjfQ1WRf0icf4M1VX\nx+kl\r\n=WeJx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHJJTopWqHJPUrNvlukAcI7EXMzQBg2qfG8GS0jZPcivAiBpm2MkMADFpCmf11aIB0xPsSMfpadO459iyzCYSOMyLg=="}]},"maintainers":[{"name":"adrien-fery","email":"contact@adrien-fery.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/s3-upload_0.1.2_1530708123390_0.5237643388494526"},"_hasShrinkwrap":false}},"time":{"created":"2018-04-02T10:13:42.191Z","0.1.1":"2018-04-02T10:13:42.338Z","modified":"2024-05-14T19:58:38.156Z","0.1.2":"2018-07-04T12:42:03.459Z"},"maintainers":[{"email":"contact@adrien-fery.com","name":"adrien-fery"}],"description":"Allows you to upload static files to S3 buckets.","homepage":"https://github.com/jamestalmage/s3-static-site-uploader#readme","keywords":["Amazon","S3","Node","Upload","Static"],"repository":{"type":"git","url":"git://github.com/jamestalmage/s3-static-site-uploader.git"},"author":{"name":"James Talmage"},"bugs":{"url":"https://github.com/jamestalmage/s3-static-site-uploader/issues"},"license":"MIT","readme":"Deploy static sites to Amazon S3 using Node!\n--------------------------------------------\n\n* Uploads are fast (only changed files are sent).\n* Old files (or files that no longer match the set of patterns) are deleted. Easily remove accidental uploads by simply changing the configuration and redeploying.\n* Configuration uses Ant Glob syntax. Easy to understand and update.  \n\n```javascript\nmodule.exports = {\n\tcredentials:\"aws-credentials.json\",\n\tbucketName:\"example.com\",\n\tprefix: \"prefix key if any\",\n\tpatterns:[\n\t\t\"scripts/*.js\",\n\t\t\"stylesheets/default.css\",\n\t\t\"images/**/*.jpg\",\n\t\t\"index.html\"\n\t]\n}\n```\n\nInstall via npm: `npm install -g s3-upload`\n\nS3 Bucket Setup\n===============\n\nCreate a bucket \n---------------\n\nLog into your [AWS S3 console](https://console.aws.amazon.com) and create a new bucket for your site.\n\nBucket names must conform with DNS requirements:\n\n* **Should not contain uppercase characters**\n* Should not contain underscores\n* Should be between 3 and 63 characters long\n* Should not end with a dash\n* Cannot contain two, adjacent periods\n* Cannot contain dashes next to periods (e.g., \"my-.bucket.com\" and \"my.-bucket\" are invalid)\n\n\nConfigure the Bucket Static Website Hosting\n-------------------------------------------\n\nOnce the bucket is created, select it and choose `Properties > Static Website Hosting`. \n\nChoose proper values for the `Index Document` and `Error Document` fields (i.e. **index.html** and **404.html**). \n\nThe Index Document is searched for relative to the requested folder: [http://my.aws.site.com/some/subfolder/]() **becomes** [http://my.aws.site.com/some/subfolder/**index.html**]().\n\t\nThe Error Document path is always relative to the root of the site. All errors are redirected to [http://my.aws.site.com/**404.html**](). \n\n\nConfigure a Public Readable Policy for the Bucket\n-------------------------------------------------\n\nStatic sites hosted on S3 do not support private files (password protection, etc). You must make all files publicly accessible. From your buckets `Properties` page, choose `Permissions > Edit/Add bucket policy`. Copy and past the policy below (replace **YOUR-BUCKET-NAME** for the bucketName you created previously)\n\n```json\n{\n\t\"Version\": \"2008-10-17\",\n\t\"Statement\": [\n\t\t{\n\t\t\t\"Sid\": \"PublicReadForGetBucketObjects\",\n\t\t\t\"Effect\": \"Allow\",\n\t\t\t\"Principal\": {\n\t\t\t\t\"AWS\": \"*\"\n\t\t\t},\n\t\t\t\"Action\": \"s3:GetObject\",\n\t\t\t\"Resource\": \"arn:aws:s3:::YOUR-BUCKET-NAME/*\"\n\t\t}\n\t]\n}\n```\n\nS3 User Setup\n=============\n\nLog into your [AWS Console](https://console.aws.amazon.com/iam/?#users) and go to the [Users](https://console.aws.amazon.com/iam/?#users) management console. Click the `Create New Users` button and enter a username. \n\nCredentials File\n----------------\n\nHave AWS create a new key pair for the user and copy the contents into a `aws-credentials.json` file in the root directory of your project. You should add this file to `.gitignore` (or similar) so that credentials are not checked into version control.\n\n```json\n{ \n\t\"accessKeyId\": \"PUBLIC_KEY\", \n\t\"secretAccessKey\": \"SECRET_KEY\", \n\t\"region\": \"us-west-2\" \n}\n```\n\n**note**: As AWS SDK's documentation points out, you could also set those as `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables \n\nUser Permissions\n----------------\n\nFrom the [AWS IAM Users Console](https://console.aws.amazon.com/iam/?#users) select the newly created user, then the `Permissions` Tab, then click the `Attach User Policy` button.  Paste in the following (substituting BUCKET-NAME as appropriate).\n\n```json\n{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Action\": [\n        \"s3:DeleteObject\",\n        \"s3:PutObject\",\n        \"s3:ListBucket\"\n      ],\n      \"Sid\": \"AllowNewUserAccessToMyBucket\",\n      \"Resource\": [\n        \"arn:aws:s3:::BUCKET-NAME\",\n\t\t\"arn:aws:s3:::BUCKET-NAME/*\"\n      ],\n      \"Effect\": \"Allow\"\n    }\n  ]\n}\n```\n\nCreate Config\n=============\n\nCreate a file called `aws-upload.conf.js` in the root directory of your project and copy and paste in the code below. Modify `bucketName` and the `patterns` array as appropriate for your project. All patterns are evaluated with the current directory as root, and the bucket directory structure will mirror the local one.\n\n```javascript\nmodule.exports = {\n\tcredentials:\"aws-credentials.json\",\n\tbucketName:\"example.com\",\n\tprefix: \"prefix key if any\",\n\tpatterns:[\n\t\t\"scripts/*.js\",\n\t\t\"stylesheets/default.css\",\n\t\t\"images/**/*.jpg\",\n\t\t\"index.html\"\n\t]\n}\n```\n\nUpload!\n=======\n\nSimply call `s3-upload` from the same directory as your config file, and the upload will happen.","readmeFilename":"README.md"}