{"id":17096135,"url":"https://github.com/ega4432/cloudfront-functions-sample","last_synced_at":"2026-04-20T03:36:20.797Z","repository":{"id":115176501,"uuid":"369778412","full_name":"ega4432/cloudfront-functions-sample","owner":"ega4432","description":"This is a sample repository of CloudFront Functions.","archived":false,"fork":false,"pushed_at":"2021-05-23T05:55:10.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-05T14:48:52.589Z","etag":null,"topics":["aws","cloudfront","cloudfront-fuctions","hcl","s3","terraform"],"latest_commit_sha":null,"homepage":"https://zenn.dev/ysmtegsr/articles/d4eb3e8493b7a5ccd427","language":"HCL","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/ega4432.png","metadata":{"files":{"readme":"README.ja.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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":"2021-05-22T10:25:07.000Z","updated_at":"2021-05-23T13:43:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"95f72302-66a6-4273-bd3d-d5ed582c9268","html_url":"https://github.com/ega4432/cloudfront-functions-sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ega4432/cloudfront-functions-sample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ega4432%2Fcloudfront-functions-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ega4432%2Fcloudfront-functions-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ega4432%2Fcloudfront-functions-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ega4432%2Fcloudfront-functions-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ega4432","download_url":"https://codeload.github.com/ega4432/cloudfront-functions-sample/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ega4432%2Fcloudfront-functions-sample/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32031863,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","cloudfront","cloudfront-fuctions","hcl","s3","terraform"],"created_at":"2024-10-14T14:44:42.296Z","updated_at":"2026-04-20T03:36:20.758Z","avatar_url":"https://github.com/ega4432.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CloudFront Functions Sample\n\n![](https://img.shields.io/badge/Terraform%20version-0.13.0-blue?logo=terraform)\n![](https://img.shields.io/badge/provider-aws-orange?logo=amazon-aws)\n![GitHub](https://img.shields.io/github/license/ysmtegsr/cloudfront-functions-sample)\n\n[ [英語](https://github.com/ysmtegsr/cloudfront-functions-sample) | 日本語 ]\n\nCloudFront Functions の検証用サンプルリポジトリです。Terraform で構築しました。\n\nref. [Amazon CloudFront が軽量エッジコンピューティング機能である CloudFront Functions を発表](https://aws.amazon.com/jp/about-aws/whats-new/2021/05/cloudfront-functions/)\n\n## セットアップ\n\n下記の CLI を使います。\n\n- AWS CLI\n- Terraform CLI via tfenv\n\nTerraform の定数ファイルを作成します。\n\n```sh\n$ vim terraform.tfvars\n```\n\n```terraform.tfvars\naws_access_key_id     = \"XXXXXXXXXXXXXXXXXX\"\naws_secret_access_key = \"YYYYYYYYYYYYYYYYYYYYYYYYY\"\nregion                = \"ap-northeast-1\"\nbucket_name           = \"cloudfront-functions-sample\"\n```\n\n\n## 構築手順\n\n```sh\n# 各モジュールをインポート\n$ terraform init\n\n# 事前確認\n$ terraform plan --var-file=terraform.tfvars\n\n# デプロイ実行\n$ terraform apply --var-file=terraform.tfvars\n```\n\n## S3 にコンテンツをアップロード\n\nAWS CLI　を使って静的コンテンツをアップロードします。\n\n```sh\n$ aws s3 cp ./src s3://\u003cBUCKET NAME\u003e/dist/ --recursive\n```\n\n\n## リソースを削除\n\n```sh\n# S3 のコンテンツを全削除\n$ aws s3 rm s3://\u003cBUCKET NAME\u003e/ --recursive\n\n# 事前確認\n$ terraform plan --var-file=terraform.tfvar --destroy\n\n# 削除\n$ terraform destroy --var-file=terraform.tfvar\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fega4432%2Fcloudfront-functions-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fega4432%2Fcloudfront-functions-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fega4432%2Fcloudfront-functions-sample/lists"}