https://github.com/klich3/s3-cloudfornt
If you have your static websites allocated on S3 Buscket / CloadFront, and needs autoupload / replace files on your bucket? This script is for add on your NPM project for upload files deleting all oldest and creating distribution invalidation for create new cache.
https://github.com/klich3/s3-cloudfornt
aws cloudfront cloudfront-distribution cloudfront-invalidation s3 s3-bucket
Last synced: 2 months ago
JSON representation
If you have your static websites allocated on S3 Buscket / CloadFront, and needs autoupload / replace files on your bucket? This script is for add on your NPM project for upload files deleting all oldest and creating distribution invalidation for create new cache.
- Host: GitHub
- URL: https://github.com/klich3/s3-cloudfornt
- Owner: klich3
- Created: 2022-01-17T12:43:16.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-11-27T00:02:04.000Z (6 months ago)
- Last Synced: 2025-01-30T01:17:16.970Z (4 months ago)
- Topics: aws, cloudfront, cloudfront-distribution, cloudfront-invalidation, s3, s3-bucket
- Language: Shell
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Script for deploy your static site to S3 and refresh CloudFront Distribution
It is a script that allows you to upload / deploy a static website deploy with a command. For this you need to have the Amazon CLI tool installed. You have to get it on your local machine, in package.json you put the profile name, and the target Backit. What it does is to upload the content and update cache in CloudFront.
## Instalation
***Dependences: Is nedded to do:***
* ***Mac***: `brew install jq`
* ***Linux***: `apt i jq` or `yaml install jq`Also needs:
* ***AWS Cli*** See this documentatio: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
* ***Profile*** See this documentation: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html```shell
chmod +x ./deploy.sh
```### Usage
```shell
./deploy.sh
```In your `package.json` file
```json
...
"scripts": {
"deploy-dev": "scripts/deploy.sh profile-name domain ./dist",
...
}
``````shell
npm run deploy-dev
```