{"id":20697445,"url":"https://github.com/epomatti/aws-cloudfront-latency","last_synced_at":"2026-04-21T15:02:45.878Z","repository":{"id":179306069,"uuid":"662770059","full_name":"epomatti/aws-cloudfront-latency","owner":"epomatti","description":"CloudFront backbone connectivity testing","archived":false,"fork":false,"pushed_at":"2024-01-20T02:25:05.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-17T18:34:48.663Z","etag":null,"topics":["apprunner","aws","cloudfront","terraform"],"latest_commit_sha":null,"homepage":"","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/epomatti.png","metadata":{"files":{"readme":"README.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}},"created_at":"2023-07-05T21:15:56.000Z","updated_at":"2023-07-06T23:56:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"e9abc054-dd9b-4725-96e3-850cdc817ff1","html_url":"https://github.com/epomatti/aws-cloudfront-latency","commit_stats":null,"previous_names":["epomatti/aws-cloudfront-latency"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Faws-cloudfront-latency","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Faws-cloudfront-latency/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Faws-cloudfront-latency/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epomatti%2Faws-cloudfront-latency/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epomatti","download_url":"https://codeload.github.com/epomatti/aws-cloudfront-latency/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242961747,"owners_count":20213315,"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":["apprunner","aws","cloudfront","terraform"],"created_at":"2024-11-17T00:18:05.568Z","updated_at":"2026-04-21T15:02:45.796Z","avatar_url":"https://github.com/epomatti.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS CloudFront latency\n\nComparing latency when using AWS CloudFront at long distances as opposed to calling a web service directly.\n\n\u003e Cache is disabled to to force round trips to the server\n\n```mermaid\nflowchart LR\n    A(Client - sa-east-1) --\u003e|Internet| B(AWS CloudFront \u003cbr/\u003e Edge Location)\n    B --\u003e|AWS backbone| C(AWS App Runner \u003cbr/\u003e us-east-2)\n    A --\u003e|Internet| C\n```\n\n\n## Setup\n\nThis project runs my [stressbox][1] image for testing as default. \n\nCreate a private ECR:\n\n```sh\naws ecr create-repository --repository-name stressbox\n```\n\nPull the image and tag it with the repository name in the account:\n\n```sh\naccount=\"\"\nregion=\"\"\n\ndocker pull ghcr.io/epomatti/stressbox\ndocker tag ghcr.io/epomatti/stressbox \"$account.dkr.ecr.$region.amazonaws.com/stressbox\"\n```\n\nPush the image to the account repository:\n\n```sh\naws ecr get-login-password --region $region | docker login --username AWS --password-stdin $account.dkr.ecr.$region.amazonaws.com\ndocker push $account.dkr.ecr.$region.amazonaws.com/stressbox\n```\n\nCreate a `.auto.tfvars` file with the ECR image URL:\n\n```terraform\necr_image = \"\u003cACCOUNT\u003e.dkr.ecr.\u003cREGION\u003e.amazonaws.com/stressbox:latest\"\n```\n\nCreate the infrastructure:\n\n```sh\nterraform init\nterraform apply -auto-approve\n```\n\nRun latency and access tests.\n\n---\n\n### Clean-up\n\nDelete the resources:\n\n```sh\nterraform destroy -auto-approve\n\naws ecr delete-repository --repository-name stressbox --force\n```\n\nTODO:\n\n```\ncloudfront custom origin slow response\nhttps://aws.amazon.com/blogs/networking-and-content-delivery/improve-your-website-performance-with-amazon-cloudfront/\n```\n\n[1]: https://github.com/epomatti/stressbox\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepomatti%2Faws-cloudfront-latency","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepomatti%2Faws-cloudfront-latency","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepomatti%2Faws-cloudfront-latency/lists"}