{"id":13539514,"url":"https://github.com/awslabs/staticwebsite-cli","last_synced_at":"2025-04-02T06:30:59.703Z","repository":{"id":152256410,"uuid":"604527025","full_name":"awslabs/staticwebsite-cli","owner":"awslabs","description":"Quickly and easily host a static website on AWS.","archived":false,"fork":false,"pushed_at":"2024-04-05T16:13:00.000Z","size":103,"stargazers_count":87,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-13T02:37:57.028Z","etag":null,"topics":["aws","cli","cloudfront","rust-lang","static-website"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/awslabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-21T08:47:49.000Z","updated_at":"2024-12-09T16:41:49.000Z","dependencies_parsed_at":"2024-01-16T15:41:29.346Z","dependency_job_id":"5d41bb47-efa6-42f4-b178-41cccf568922","html_url":"https://github.com/awslabs/staticwebsite-cli","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awslabs%2Fstaticwebsite-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awslabs%2Fstaticwebsite-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awslabs%2Fstaticwebsite-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awslabs%2Fstaticwebsite-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/awslabs","download_url":"https://codeload.github.com/awslabs/staticwebsite-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246767733,"owners_count":20830544,"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","cli","cloudfront","rust-lang","static-website"],"created_at":"2024-08-01T09:01:27.071Z","updated_at":"2025-04-02T06:30:58.514Z","avatar_url":"https://github.com/awslabs.png","language":"Rust","readme":"# Static Website CLI\n![build](https://github.com/awslabs/staticwebsite-cli/actions/workflows/build.yaml/badge.svg?branch=main)\n\nThis CLI tool makes it easy to deploy a static website to AWS. It builds and hosts the website, sets up a CDN and DNS,\nand provisions an SSL certificate.\n\n## Prerequisites\n\nIn order to manage DNS, the tool needs to be able to configure endpoints in your DNS zone. You must have an existing\nRoute53 zone corresponding to the `--domain-zone` specified. To purchase a new domain name and setup the corresponding\nzone, follow the [Register a domain name](https://aws.amazon.com/getting-started/hands-on/get-a-domain/) instructions here.\n\nThis will have cost implications!\n\n### AWS Access\nThe tool needs AWS CLI credentials setup in order to deploy to AWS. The minimum policy required is available in a\nsample [policy.json](policy.json) document. \n\nAlthough the AWS CLI itself isn't required, staticwebsite-cli uses the same configuration system. The CLI's \n[credential file configuration](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html)\ndocumentation will help you get started.\n\nYou will need to either:\n\n* Setup a profile in your AWS credentials file\n* Setup environment variables `AWS_ACCESS_KEY` and `AWS_SECRET_ACCESS_KEY` \n\n## Download the CLI\nGrab the [latest release artifact](https://github.com/awslabs/staticwebsite-cli/releases/latest) for your system. Builds are published for Windows, Mac, and Linux. Alternatively, clone this repository and run `cargo build` 🙂!\n\n## Usage\nSimply specify:\n```\n--domain-zone The zone to deploy the website into - e.g. - mydomain.com\n--domain-name The name of the host. If this isn't specified, we'll deploy at the apex\n--deploy The directory containing the static website to deploy\n```\nYour website will then be accessible at `https://{domain-name}.{domain-zone}` or simply `https://{domain-zone}` if you \ndidn't specify a `domain-name` within the zone\n\n```bash\n\u003e staticwebsite_cli --domain-zone demo.com --domain-name rustacean --deploy sample\n\n💻 ➜  staticwebsite-cli git:(main) ✗ target/debug/staticwebsite_cli --domain-zone demo.com --domain-name rustacean --deploy test\nINFO staticwebsite_cli: Checking AWS access\nINFO staticwebsite_cli: AWS access looks good, continuing\nINFO staticwebsite_cli: Found zone zone=\"ABCDEFG\"\nINFO staticwebsite_cli: Using Cloudformation stack name=\"StaticSite--rustacean-demo-com\"\nINFO staticwebsite_cli: Stack doesnt exist; creating\nINFO staticwebsite_cli: Stack created stack_id=\"...\"\nINFO staticwebsite_cli: Waiting for stack deployment to complete\n...\nINFO staticwebsite_cli::cloudformation_helpers: Stack status status=\"CREATE_IN_PROGRESS\"\nINFO staticwebsite_cli::cloudformation_helpers: Stack status status=\"CREATE_COMPLETE\"\nINFO staticwebsite_cli: Stack deploy complete\nINFO staticwebsite_cli: Finding website bucket\nINFO staticwebsite_cli: Uploading bucket=\"...\"\nINFO staticwebsite_cli: Invalidating distribution distribution_id=\"E3EF9EZ9CV2KGJ\"\nINFO staticwebsite_cli::cloudfront_helpers: Waiting for invalidation to complete\nINFO staticwebsite_cli::cloudfront_helpers: Invalidation status=\"InProgress\"\nINFO staticwebsite_cli::cloudfront_helpers: Invalidation status=\"Completed\"\nINFO staticwebsite_cli: Distribution invalidated. Ready to go!\nINFO staticwebsite_cli: Link href=\"https://rustacean.demo.com\"\nINFO staticwebsite_cli: All done!\n```\n\n## Updates\nSimply re-run `staticwebsite_cli` with the same arguments to replace the contents of the website. The CLI will invalidate\nthe CDN distribution and the changes should become immediately available.\n\n## Removing the stack\n\n1. Login to the AWS console\n1. Visit the [Cloudformation console in us-east-1](https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks)\n1. Find the stack named `StaticSite--your-domain-name` and delete it.\n","funding_links":[],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawslabs%2Fstaticwebsite-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fawslabs%2Fstaticwebsite-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawslabs%2Fstaticwebsite-cli/lists"}