{"_id":"@dfens/ghost-storage-adapter-s3","_rev":"2-978c71596af0d0b9455341348f8d54bd","name":"@dfens/ghost-storage-adapter-s3","dist-tags":{"latest":"0.0.1-development"},"versions":{"0.0.0-development":{"author":{"name":"Colin Meinke","email":"hello@colinmeinke.com","url":"https://colinmeinke.com"},"babel":{"plugins":["transform-object-rest-spread","add-module-exports"],"presets":[["env",{"targets":{"node":"4.5"},"exclude":["transform-es2015-classes"]}]]},"bugs":{"url":"https://github.com/colinmeinke/ghost-storage-adapter-s3/issues"},"config":{"commitizen":{"path":"node_modules/cz-conventional-changelog"}},"dependencies":{"aws-sdk":"^2.331.0","ghost-storage-base":"0.0.1"},"description":"An AWS S3 storage adapter for Ghost 0.10+","devDependencies":{"babel-cli":"^6.14.0","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.8.0","babel-preset-env":"^1.6.0","commitizen":"^2.8.6","cz-conventional-changelog":"^1.2.0","semantic-release":"^15.9.9","snazzy":"^5.0.0","standard":"^8.3.0","travis-deploy-once":"^5.0.2"},"homepage":"https://github.com/colinmeinke/ghost-storage-adapter-s3#readme","license":"ISC","keywords":["adapter","aws","ghost","s3","storage"],"main":"index.js","name":"@dfens/ghost-storage-adapter-s3","repository":{"type":"git","url":"git+https://github.com/colinmeinke/ghost-storage-adapter-s3.git"},"scripts":{"build":"babel ./src/index.js --out-file ./index.js","commit":"git-cz","fix":"standard --fix","lint":"standard --verbose | snazzy","prepublish":"npm run build","semantic-release":"semantic-release","test":"exit 0","travis-deploy-once":"travis-deploy-once"},"version":"0.0.0-development","gitHead":"b9f9a1c5b1ec83b917a72ac45da3670a229c8a55","_id":"@dfens/ghost-storage-adapter-s3@0.0.0-development","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-64gCacQISadnXqb4JE/lzdbJdBEmSihQjkU4WCLJx/vwaQNDxKiD5myNOsMRRdxLAlBQILoVDsVENdP8RwDRvA==","shasum":"6b29b324722ff4357cd55a4c5ed41f3ff7121cba","tarball":"https://registry.npmjs.org/@dfens/ghost-storage-adapter-s3/-/ghost-storage-adapter-s3-0.0.0-development.tgz","fileCount":8,"unpackedSize":26761,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd9u8jCRA9TVsSAnZWagAAYtAP/jQCsi7KEW7TPR1ReTMF\nj5CIQQmvxnYPC+Z4HXOXjx84d69LhFkH/+QtlMq9hpaWD8EzG14LPCo1y9Rs\nYC18j3tV8INlrW+O1pzfGIEMDq0hNaBuJW7q7qjKqLMIcN7V2h0u1Lkhjuf1\nqN6CpXnkoVX4Ou87lOeOsN7KFrI4mS7S3r+heCmB36v/RBw2sOmc51ZB22/a\nWUfJ2G8jzBiPk6MGmRQAixQvVq2pZXIblI6hbj21r+UM7y8QuoyoCnSH5TE+\nFc2X4dSdcnbkXhzGQ5BXclR64tq/KwSpiu2fis29IoRWeYNsT7JyFavi4qV2\nII598gXDoxrhWjyxMlqbaFBEbzLL4CrK2DDVTb2z1p8ESZNOCcklMpXNrP59\n+A8Kmu3BsqNi4KrqiqGNZZ5s79HSldJPNEkum1pQP/j4NHEFRIrEP3i76RMc\ntckRrQa+0lwNfWihVU0ZDTNKmw+Bq3mjL7VKJfP1ef1+1xRPaQZSDmALKvVY\nFSNHelAjNgloKRWwJugDUlNjLhcJXQScEZFlvRq/+Hl2ZTY2VhhpeBzkAFrB\n8mwxuKW9LbuKyCRQrBAc7l6uR8m2eBM+NIiIWCMLY+uMpm5K53bA1bCaEUHO\nelit1iXMp0zUiIfIFwn4lk7lsGgQfcbzAOoo1SNvP+rrrjZ7LSdCFfxFCU/x\ntHDt\r\n=VTKP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA0RVrFZpHnCSeoZTrDKjf4ITVxaLCZqS0oAvciPomNlAiA9VQwtGiXx7W1/mVDpHFgeOWgcBWy/epZ2FuLFOEKFmg=="}]},"maintainers":[{"name":"dfens","email":"davehemming@gmail.com"}],"_npmUser":{"name":"dfens","email":"davehemming@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ghost-storage-adapter-s3_0.0.0-development_1576464162477_0.5429258543664381"},"_hasShrinkwrap":false},"0.0.1-development":{"author":{"name":"Colin Meinke","email":"hello@colinmeinke.com","url":"https://colinmeinke.com"},"babel":{"plugins":["transform-object-rest-spread","add-module-exports"],"presets":[["env",{"targets":{"node":"4.5"},"exclude":["transform-es2015-classes"]}]]},"bugs":{"url":"https://github.com/colinmeinke/ghost-storage-adapter-s3/issues"},"config":{"commitizen":{"path":"node_modules/cz-conventional-changelog"}},"dependencies":{"aws-sdk":"^2.331.0","ghost-storage-base":"0.0.1"},"description":"An AWS S3 storage adapter for Ghost 0.10+","devDependencies":{"babel-cli":"^6.14.0","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.8.0","babel-preset-env":"^1.6.0","commitizen":"^2.8.6","cz-conventional-changelog":"^1.2.0","semantic-release":"^15.9.9","snazzy":"^5.0.0","standard":"^8.3.0","travis-deploy-once":"^5.0.2"},"homepage":"https://github.com/colinmeinke/ghost-storage-adapter-s3#readme","license":"ISC","keywords":["adapter","aws","ghost","s3","storage"],"main":"index.js","name":"@dfens/ghost-storage-adapter-s3","repository":{"type":"git","url":"git+https://github.com/colinmeinke/ghost-storage-adapter-s3.git"},"scripts":{"build":"babel ./src/index.js --out-file ./index.js","commit":"git-cz","fix":"standard --fix","lint":"standard --verbose | snazzy","prepublish":"npm run build","semantic-release":"semantic-release","test":"exit 0","travis-deploy-once":"travis-deploy-once"},"version":"0.0.1-development","gitHead":"b9f9a1c5b1ec83b917a72ac45da3670a229c8a55","_id":"@dfens/ghost-storage-adapter-s3@0.0.1-development","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-uqwYsf4/OqXyFEG7L4AxeTFaiK4nSP0WtMdSp6/rZCOIChDAmTc3a1hQreySWon5N3J+wTzl3/JmC8Z+b67LDw==","shasum":"7e7e5bfd14562ca0cc561459a405774c676eb8b6","tarball":"https://registry.npmjs.org/@dfens/ghost-storage-adapter-s3/-/ghost-storage-adapter-s3-0.0.1-development.tgz","fileCount":8,"unpackedSize":26761,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd9vMnCRA9TVsSAnZWagAAcjUP/R0STJsFKIKjbawlcgg4\n1oV4sRd8QGF4A8CsQduze8Ca5w/q+SlUhvbEyWAG2CfMiZXwOmDXDWjSWNx2\nPsoJXbn9gStq/4NYZyWHfrAMClMvZrFuOJHy3wabte3JgNy2iuwElGA7pIle\nt51JkBziHE1bQg7yqV4Oe3oZe2aQX4E4lusq01YaXPfaFAytdF2vw2iQ+pNh\nfWNDbDcC0R6N0090tDVaPhW4lLqDTXZh1DJoZ7jIodMSebhkHAPFEZ6lE4NB\nm/tMjK8bzo1dlUwW7SvAFtfWUxGV9iUqA5mBUcqcnPqlBUj+vHA5zsI8bMHL\nhO7fFUbnyMJ9U0XPY+nJ4aI8A3agob8JN6+53/6vFrY6yxMNm/VyFE8Pblzi\njjoWnAfYLbcniA0PA57F6AAmDVkM9zC+A9264vWBGKWgwEO4Oj/mVf0RkIY/\n5YeCHsne6gJTxjnBNDruOKjf4i7aO3aGXg73pQxaKWS0nAZyxkgHFqmuIE5B\nqci9Kki4eUS/f78uxxHobuMT8fgwaMofqgkCdhcGimmqdgFGdLM/I8HrV6f0\nsb/hG8USsZkck8Xpq5GS5fuZkZDaktMJJKVyrRSL2Xhqd+sacbptYqNwsqIP\nNxaATCOOc2ZBP4EjPRO95HeedlJObd79sKCBkFYrmpg3ANPRNdxMAgpaHSfN\ntQd9\r\n=P+73\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRlMISz6z/dM7d708sMIoYWuQWojzWPDPprJhm7SeLWwIgKuBRI5Drk6XjeDKPSZGsoQqfoAL1uoia+i1WHGQaiKM="}]},"maintainers":[{"name":"dfens","email":"davehemming@gmail.com"}],"_npmUser":{"name":"dfens","email":"davehemming@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ghost-storage-adapter-s3_0.0.1-development_1576465191113_0.346242820568474"},"_hasShrinkwrap":false}},"time":{"created":"2019-12-16T02:42:42.447Z","0.0.0-development":"2019-12-16T02:42:42.631Z","modified":"2022-04-05T04:16:58.355Z","0.0.1-development":"2019-12-16T02:59:51.280Z"},"maintainers":[{"name":"dfens","email":"davehemming@gmail.com"}],"description":"An AWS S3 storage adapter for Ghost 0.10+","homepage":"https://github.com/colinmeinke/ghost-storage-adapter-s3#readme","keywords":["adapter","aws","ghost","s3","storage"],"repository":{"type":"git","url":"git+https://github.com/colinmeinke/ghost-storage-adapter-s3.git"},"author":{"name":"Colin Meinke","email":"hello@colinmeinke.com","url":"https://colinmeinke.com"},"bugs":{"url":"https://github.com/colinmeinke/ghost-storage-adapter-s3/issues"},"license":"ISC","readme":"# Ghost storage adapter S3\n\nAn AWS S3 storage adapter for Ghost 1.x\n\nFor Ghost 0.10.x and 0.11.x support check out\n[Ghost storage adapter s3 v1.3.0](https://github.com/colinmeinke/ghost-storage-adapter-s3/releases/tag/v1.3.0).\n\n## Installation\n\n```shell\nnpm install ghost-storage-adapter-s3\nmkdir -p ./content/adapters/storage\ncp -r ./node_modules/ghost-storage-adapter-s3 ./content/adapters/storage/s3\n```\n\n## Configuration\n\n```json\n\"storage\": {\n  \"active\": \"s3\",\n  \"s3\": {\n    \"accessKeyId\": \"YOUR_ACCESS_KEY_ID\",\n    \"secretAccessKey\": \"YOUR_SECRET_ACCESS_KEY\",\n    \"region\": \"YOUR_REGION_SLUG\",\n    \"bucket\": \"YOUR_BUCKET_NAME\",\n    \"assetHost\": \"YOUR_OPTIONAL_CDN_URL (See note 1 below)\",\n    \"signatureVersion\": \"REGION_SIGNATURE_VERSION (See note 5 below)\",\n    \"pathPrefix\": \"YOUR_OPTIONAL_BUCKET_SUBDIRECTORY\",\n    \"endpoint\": \"YOUR_OPTIONAL_ENDPOINT_URL (only needed for 3rd party S3 providers)\",\n    \"serverSideEncryption\": \"YOUR_OPTIONAL_SSE (See note 2 below)\",\n    \"forcePathStyle\": true,\n    \"acl\": \"YOUR_OPTIONAL_ACL (See note 4 below)\",\n  }\n}\n```\nNote 1: Be sure to include \"//\" or the appropriate protocol within your assetHost string/variable to ensure that your site's domain is not prepended to the CDN URL.\n\nNote 2: if your s3 bucket enforces SSE use serverSideEncryption with the [appropriate supported](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#putObject-property) value.\n\nNote 3: if your s3 providers requires path style you can enable it with `forcePathStyle`\n\nNote 4: if you use CloudFront the object ACL does not need to be set to \"public-read\"\n\nNote 5: [Support for AWS4-HMAC-SHA256](https://github.com/colinmeinke/ghost-storage-adapter-s3/issues/43)\n\n### Via environment variables\n\n```\nAWS_ACCESS_KEY_ID\nAWS_SECRET_ACCESS_KEY\nAWS_DEFAULT_REGION\nGHOST_STORAGE_ADAPTER_S3_PATH_BUCKET\nGHOST_STORAGE_ADAPTER_S3_ASSET_HOST  // optional\nGHOST_STORAGE_ADAPTER_S3_PATH_PREFIX // optional\nGHOST_STORAGE_ADAPTER_S3_ENDPOINT // optional\nGHOST_STORAGE_ADAPTER_S3_SSE // optional\nGHOST_STORAGE_ADAPTER_S3_FORCE_PATH_STYLE // optional\nGHOST_STORAGE_ADAPTER_S3_ACL // optional\n```\n\n## AWS Configuration\nYou'll likely want to configure a separate S3 bucket for your blog, a specific IAM role, and, optionally, CloudFront, to serve from a CDN.\n\n### S3\nCreate a new bucket. If you're using a CDN, the region isn't important. Once the bucket is created, select Static website hosting from the properties, and configure it to host a website.\n\nIn the permissions, select Bucket Policy and use the policy generator with the folowing settings:\n- Select Type of Policy: **S3 Bucket Policy**\n- Effect: **Allow**\n- Principal: *\n- AWS Service: **Amazon S3**\n- Actions: **GetBucket**\n- Amazon Resource Name (ARN): *your bucket's ARN, which you can get on its Bucket Policy page*\n\nGenerate the policy, copy it, then paste it in the Bucket policy editor and save.\n\n### IAM\nYou'll want to create a custom user role in IAM that just gives your Ghost installation the necessary permissions to manipulate objects in its S3 bucket.\n\nGo to IAM in your AWS console and add a new user. Give it a username specific to your blog, and select **Programmatic access** as the Access type.\n\nNext, on the permissions page, select **Attach existing policies directly** and click to **Create policy**. For the policy click on the JSON editor and add the following policy. You'll want to replace where it says **ghost-bucket** with the name of your blog's S3 bucket.\n\n```\n{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"VisualEditor0\",\n            \"Effect\": \"Allow\",\n            \"Action\": \"s3:ListBucket\",\n            \"Resource\": \"arn:aws:s3:::ghost-bucket\"\n        },\n        {\n            \"Sid\": \"VisualEditor1\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"s3:PutObject\",\n                \"s3:GetObject\",\n                \"s3:PutObjectVersionAcl\",\n                \"s3:DeleteObject\",\n                \"s3:PutObjectAcl\"\n            ],\n            \"Resource\": \"arn:aws:s3:::ghost-bucket/*\"\n        }\n    ]\n}\n```\n\nWhat this policy does is allow the user access to see the contents of the bucket (the first statement), and then manipulate the objects stored in the bucket (the second statement).\n\nFinally, create the user and copy the **Access key** and **Secret access key**, these are what you'll use in your configuration.\n\nAt this point you could be done, but, optionally, you could put Amazon's CloudFront CDN in front of the bucket to speed things up.\n\n### CloudFront\nCloudFront is a CDN that replicates objects in servers around the world so your blog's visitors will get your assets faster by using the server closest to them. It uses your S3 bucket as the \"source of truth\" that it populates its servers with.\n\nGot to CloudFront in AWS and choose to **Create a Distribution**. On the next screen you'll want to leave everything the same, except change the following:\n- Origin Domain Name: **Set this to the Endpoint url listed in the Static website hosting panel in the S3 bucket configuration**\n- Viewer Protocol Policy: **Redirect HTTP to HTTPS**\n- Compress Objects Automatically: **Yes**\n\nThen create the distribution.\n\nNext you'll want to configure your domain name to point a subdomain at CloudFront so you can serve static content through the CDN. Click on the distribution you just created and go the General tab. In Alternate Domain Names, add a subdomain from your url to be the CDN. For instance, if your domain is *yourdomain.com*, do something like *cdn.yourdomain.com*.\n\nNext, you'll want to enable SSL. If you're already using Amazon's Route53 DNS service, you may already have an SSL certificate for your domain with a wildcard, if not, choose to create one for your subdomain. If you're using Route53 you can have them automatically add the proper entries to your DNS records for validation and have the certificate generated. If not, go through the alternate route.\n\nNext, configure the DNS entry for the subdomain for CloudFront. Go to your DNS configuration and add an A record for **cdn** (or whatever subdomain your chose), and then set it up as an alias that points at your CloudFront distribution URL. If you're using Route53 it will actually provide you with distribution as an option.\n\nFinally, in your configuration, use the subdomain for the CloudFront distribution as your setting for *assetHost*.\n\n## License\n\n[ISC](./LICENSE.md)\n","readmeFilename":"README.md"}