{"id":19243906,"url":"https://github.com/ibudasov/shorty","last_synced_at":"2026-05-04T00:34:58.580Z","repository":{"id":185181897,"uuid":"672973039","full_name":"ibudasov/shorty","owner":"ibudasov","description":"A URL shortening service. Made with AWS S3 and AWS Lambda, provisioned with Terraform","archived":false,"fork":false,"pushed_at":"2024-01-08T11:41:58.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-13T19:39:26.548Z","etag":null,"topics":["aws","aws-lambda","aws-s3","docker-compose","k6","terraform","typescript"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ibudasov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-07-31T15:20:32.000Z","updated_at":"2024-01-18T00:17:30.000Z","dependencies_parsed_at":"2024-01-08T13:14:28.656Z","dependency_job_id":"9c7ee05b-b98b-480d-bc50-5be193646e1f","html_url":"https://github.com/ibudasov/shorty","commit_stats":null,"previous_names":["ibudasov/shorty"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ibudasov/shorty","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibudasov%2Fshorty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibudasov%2Fshorty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibudasov%2Fshorty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibudasov%2Fshorty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ibudasov","download_url":"https://codeload.github.com/ibudasov/shorty/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibudasov%2Fshorty/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32590455,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","aws-lambda","aws-s3","docker-compose","k6","terraform","typescript"],"created_at":"2024-11-09T17:20:46.460Z","updated_at":"2026-05-04T00:34:58.540Z","avatar_url":"https://github.com/ibudasov.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ✂️ Shorty\nAn URL shortening service\n\n## How it works\n- AWS API Gateway takes requests globally and passes them to AWS Lambda\n- AWS Lambda is an auto-scalable serverless solution from AWS. In this case we use containerized approach instead of just uploading the code.\n- AWS S3 is used as a storage of the URLs. Each URL is stored as an object with a short random name, the URL slug. Also we specify the target URL in a special header of the object. Once somebody is trying to open the referenced object — they will be redirected to the target URL. This is a standard S3 mechanism\n- URLs older than 90 days will be removed automatically with another S3 mechanism\n\n## Availability — 99.95%\n- AWS Lambda — 99.95%\n- AWS S3 — 99.99%\n- AWS API Gateway — 99.95%\n\n## How it performs — `297.84ms` avg response time\n\n```shell\nrunning (40.0s), 00000/10000 VUs, 7140 complete and 3173 interrupted iterations\ndefault ✓ [======================================] 10000 VUs  10s\n\n     data_received..............: 49 MB   1.2 MB/s\n     data_sent..................: 5.7 MB  142 kB/s\n     http_req_blocked...........: avg=19.77s   min=0s       med=20.29s   max=39.82s   p(90)=31.94s  p(95)=33.74s\n     http_req_connecting........: avg=5.35s    min=0s       med=4.49s    max=27.42s   p(90)=11.36s  p(95)=11.47s\n     http_req_duration..........: avg=2.72s    min=0s       med=297.84ms max=38.36s   p(90)=9.66s   p(95)=14.6s\n     http_req_failed............: 100.00% ✓ 7140       ✗ 0\n     http_req_receiving.........: avg=329.85ms min=0s       med=29µs     max=29.42s   p(90)=53.56ms p(95)=1.7s\n     http_req_sending...........: avg=356.35µs min=0s       med=57µs     max=171.52ms p(90)=114µs   p(95)=196µs\n     http_req_tls_handshaking...: avg=14.48s   min=0s       med=14.61s   max=36.73s   p(90)=28.35s  p(95)=31.16s\n     http_req_waiting...........: avg=2.39s    min=0s       med=244.6ms  max=38.36s   p(90)=8.66s   p(95)=13.93s\n     http_reqs..................: 7140    178.325517/s\n     iteration_duration.........: avg=23.04s   min=348.96ms med=23.41s   max=39.92s   p(90)=33.06s  p(95)=35.86s\n     iterations.................: 7140    178.325517/s\n     vus........................: 3232    min=3232     max=10000\n     vus_max....................: 10000   min=10000    max=10000\n```\n\n## 💸 Costs \n- do the estimation https://calculator.aws/#/addService \n\n## 🔐 Security improvements\n- https://aws.amazon.com/blogs/apn/simplify-and-secure-terraform-workflows-on-aws-with-dynamic-provider-credentials/ \n\n## Improvements backlog\n- introduce environments, now it is just `prod`\n- proper versioning for CD, now it is just hardcoded\n- introduce variables in `*.tf` where it makes sense, now many things are just hardcoded, because it is a POC \n\n## Useful commands\n```shell\n# run the load test to see how the system performs\nk6 run loadtest.js\n\n# to build the container and test it locally\nnpm run serve\n# would run a query against serving container\nnpm run test\n# to deploy the latest changes to the repository\nnpm deploy\n\n# and also some other commands\nbrew install awscli\naws configure\naws sts get-caller-identity\naws sts get-session-token\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibudasov%2Fshorty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibudasov%2Fshorty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibudasov%2Fshorty/lists"}