{"id":15285542,"url":"https://github.com/jefiozie/ngx-aws-deploy","last_synced_at":"2025-05-16T11:04:27.042Z","repository":{"id":38992013,"uuid":"232636140","full_name":"Jefiozie/ngx-aws-deploy","owner":"Jefiozie","description":"☁️🚀 Deploy your Angular app to Amazon S3 directly from the Angular CLI  🚀☁️","archived":false,"fork":false,"pushed_at":"2024-12-20T10:48:04.000Z","size":3481,"stargazers_count":97,"open_issues_count":17,"forks_count":34,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-16T11:04:24.507Z","etag":null,"topics":["amazon","angular","aws","builder","deploy","hacktoberfest"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@jefiozie/ngx-aws-deploy","language":"TypeScript","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/Jefiozie.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-08T18:57:05.000Z","updated_at":"2025-05-15T20:39:26.000Z","dependencies_parsed_at":"2023-02-19T05:16:04.293Z","dependency_job_id":"b796854e-f51e-442a-882f-d4c323ec9506","html_url":"https://github.com/Jefiozie/ngx-aws-deploy","commit_stats":{"total_commits":56,"total_committers":13,"mean_commits":"4.3076923076923075","dds":0.5357142857142857,"last_synced_commit":"7d3457e680a96f02e53c97b114e2e131a759d6c4"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jefiozie%2Fngx-aws-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jefiozie%2Fngx-aws-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jefiozie%2Fngx-aws-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jefiozie%2Fngx-aws-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jefiozie","download_url":"https://codeload.github.com/Jefiozie/ngx-aws-deploy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254518384,"owners_count":22084374,"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":["amazon","angular","aws","builder","deploy","hacktoberfest"],"created_at":"2024-09-30T15:05:57.041Z","updated_at":"2025-05-16T11:04:26.810Z","avatar_url":"https://github.com/Jefiozie.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NGX-AWS-DEPLOY\n\n☁️🚀 Deploy your Angular app to Amazon S3 directly from the Angular CLI 🚀☁️\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n\n[![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors-)\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\n![CI](https://github.com/Jefiozie/ngx-aws-deploy/workflows/Publish/badge.svg)\n![npm](https://img.shields.io/npm/dw/@jefiozie/ngx-aws-deploy)\n![npm (scoped)](https://img.shields.io/npm/v/@jefiozie/ngx-aws-deploy)\n![GitHub issues](https://img.shields.io/github/issues/jefiozie/ngx-aws-deploy)\n\u003ca href=\"https://twitter.com/jefiozie\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/say-thanks-ff69b4.svg\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"https://twitter.com/jefiozie\"\u003e  \n \u003cimg alt=\"Twitter Follow\" src=\"https://img.shields.io/twitter/follow/jefiozie?style=social\"\u003e\n\u003c/a\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/Jefiozie/ngx-aws-deploy/blob/main/ngx-aws-deploy_logo.png?raw=true\" alt=\"ngx-aws-deploy\" /\u003e\n\u003c/p\u003e\n\n## Quick Start\n\n1. Install the latest version of Angular cli\n\n   ```sh\n   yarn global add @angular/cli\n   ```\n\n2. Create a new Angular project\n   ```sh\n   ng new hello-world --defaults\n   cd hello-world\n   ```\n3. Add `@jefiozie/ngx-aws-deploy` to your project\n\n   ```sh\n   ng add @jefiozie/ngx-aws-deploy\n   ```\n\n4. After these steps your `angular.json` is updated with a new builder:\n\n   ```json\n   \"deploy\": {\n      \"builder\": \"@jefiozie/ngx-aws-deploy:deploy\",\n      \"options\": {}\n   }\n   ```\n\n5. Due to security risk we have made the decision to never add any options to the `angular.json`. You should set the environments variable during the `ng deploy` command. Below is an example on how you could do this.\n\n```bash\nnpx cross-env NG_DEPLOY_AWS_ACCESS_KEY_ID=1234 NG_DEPLOY_AWS_SECRET_ACCESS_KEY=321ACCESS NG_DEPLOY_AWS_BUCKET=mys3bucket NG_DEPLOY_AWS_REGION=eu-1-region NG_DEPLOY_AWS_SUB_FOLDER=path/on/bucker ng deploy\n```\n\n6. To trigger an optional invalidation of the files in an AWS CloudFront distribution, add these parameters to the above command line:\n\n```\nnpx cross-env ... NG_DEPLOY_AWS_CF_DISTRIBUTION_ID=1234 ... ng deploy\n```\n\n7. To apply properties on uploaded files, use the `NG_DEPLOY_AWS_GLOB_FILE_UPLOAD_PARAMS_LIST` variable or the target option `globFileUploadParamsList` as shown below.  \n   We use an array of objects to represent the different configurations.  \n   Each config object needs a `glob` property to define on which files the params will be set.  \n   Other properties on the config object are the params to apply.\n   For informations about the possible params (ACL, Bucket, CacheControl, etc), checkout the documentation of the `s3.upload` method (https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#upload-property)\n\n```json\n\"deploy\": {\n  \"builder\": \"@jefiozie/ngx-aws-deploy:deploy\",\n  \"options\": {\n    \"globFileUploadParamsList\": [\n      {\n        \"glob\": \"*\",\n        \"ACL\": \"public-read\",\n        \"CacheControl\": \"max-age=3600\"\n      },\n      {\n        \"glob\": \"*.html\",\n        \"CacheControl\": \"max-age=300\"\n      }\n    ]\n  }\n},\n```\n\nThe order of the config objects matters, the one that comes last is the one that will be used, as shown above:\n\n- CacheControl is set for all files but it's overidden by the next config object only for html files. Convenient for declaring exceptions and not repeat global settings.\n\nTo set this using the environment variable `NG_DEPLOY_AWS_GLOB_FILE_UPLOAD_PARAMS_LIST`, simply stringify the config object to JSON with `JSON.stringify`.\n\n```bash\nnpx cross-env ... NG_DEPLOY_AWS_GLOB_FILE_UPLOAD_PARAMS_LIST='[{\"glob\":\"*\",\"ACL\":\"public-read\",\"CacheControl\":\"max-age=3600\"},{\"glob\":\"*.html\",\"CacheControl\":\"max-age=300\"}]' ... ng deploy\n```\n\n8. Run `ng deploy` to deploy your application to Amazon S3.\n\n🚀**_Happy deploying!_** 🚀\n\n## Security 🔑\n\nKeep in mind that **with the default config, everybody that has access to the angular.json will have your aws secret**.\nIf you want more security, you can also use environment variable with `NG_DEPLOY_AWS_ACCESS_KEY_ID`, `NG_DEPLOY_AWS_SECRET_ACCESS_KEY`, `NG_DEPLOY_AWS_BUCKET` and `NG_DEPLOY_AWS_REGION`.\n\n#### Minimal Required IAM Policy for AWS Credentials\n\n```\n{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"s3:ListBucket\"\n            ],\n            \"Resource\": [\n                \"arn:aws:s3:::$BUCKET_NAME$\"\n            ]\n        },\n        {\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"s3:PutObject\",\n                \"s3:DeleteObject\"\n            ],\n            \"Resource\": [\n                \"arn:aws:s3:::$BUCKET_NAME$/*\"\n            ]\n        }\n    ]\n}\n```\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\nThe builder is located in the `libs\\ngx-aws-deploy`folder.\nThe sample app is located in the `apps\\demo-app` folder.\nPlease make sure to update tests as appropriate.\n\n## License\n\n[MIT](./LICENSE)\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://jefiozie.github.io\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/17835373?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJeffrey Bosch\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/Jefiozie/ngx-aws-deploy/commits?author=Jefiozie\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#content-Jefiozie\" title=\"Content\"\u003e🖋\u003c/a\u003e \u003ca href=\"https://github.com/Jefiozie/ngx-aws-deploy/pulls?q=is%3Apr+reviewed-by%3AJefiozie\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://www.santoshyadav.dev\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/11923975?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eSantosh Yadav\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/Jefiozie/ngx-aws-deploy/commits?author=santoshyadav198613\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/beaussart\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/7281023?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eNicolas Beaussart\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/Jefiozie/ngx-aws-deploy/commits?author=beaussart\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://stefannieuwenhuis.github.io/\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/12104589?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eStefan Nieuwenhuis\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/Jefiozie/ngx-aws-deploy/commits?author=StefanNieuwenhuis\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/zack9433\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/1610642?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eZack Yang\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/Jefiozie/ngx-aws-deploy/commits?author=zack9433\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://djhouseknecht.github.io/\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/32391370?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDavid Houseknecht\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/Jefiozie/ngx-aws-deploy/commits?author=djhouseknecht\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/brianfromoregon\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/1198163?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eBrian Harris\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/Jefiozie/ngx-aws-deploy/commits?author=brianfromoregon\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://www.mv-web.net\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/4363766?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMichael Vogl\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/Jefiozie/ngx-aws-deploy/commits?author=cubasepp\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-enable --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjefiozie%2Fngx-aws-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjefiozie%2Fngx-aws-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjefiozie%2Fngx-aws-deploy/lists"}