{"id":22127802,"url":"https://github.com/sashee/permanent_signed_urls","last_synced_at":"2026-07-03T11:34:18.724Z","repository":{"id":138842812,"uuid":"262260204","full_name":"sashee/permanent_signed_urls","owner":"sashee","description":"Demo project on how to generate permalinks with S3 signed URLs","archived":false,"fork":false,"pushed_at":"2021-06-18T08:15:07.000Z","size":1288,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-06T04:03:13.648Z","etag":null,"topics":["aws","lambda","permalinks","signed-urls"],"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/sashee.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":"2020-05-08T07:48:24.000Z","updated_at":"2021-06-18T08:15:10.000Z","dependencies_parsed_at":"2023-03-17T23:15:16.097Z","dependency_job_id":null,"html_url":"https://github.com/sashee/permanent_signed_urls","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sashee/permanent_signed_urls","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sashee%2Fpermanent_signed_urls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sashee%2Fpermanent_signed_urls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sashee%2Fpermanent_signed_urls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sashee%2Fpermanent_signed_urls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sashee","download_url":"https://codeload.github.com/sashee/permanent_signed_urls/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sashee%2Fpermanent_signed_urls/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278646809,"owners_count":26021520,"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","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"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","lambda","permalinks","signed-urls"],"created_at":"2024-12-01T17:21:12.664Z","updated_at":"2025-10-06T17:15:38.097Z","avatar_url":"https://github.com/sashee.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Demo project to show how to use permanent links with signed URLs\n\n## How it works\n\nIn this demo system users can generate permanent URLs for files in a bucket. These URLs contain a token that is used to identify the object and to check access.\n\nThe tokens are stored in a DynamoDB table along with the object's key. When a permalink is opened with a given token, this table is used to lookup the key and then a 303 redirect is sent back to the client with a signed URL.\n\nThis also provides a revoke functionality as deleting a row from a table prevents further use of that URL.\n\n## How to deploy\n\n### Prerequisites\n\n* terraform\n\n### Deploy\n\n* terraform init\n* terraform apply\n* go to the resulting URL\n\n### Cleanup\n\n* terraform destroy\n\n## How to use\n\nThe first table is the list of objects in the bucket. Use the button to generate a new permalink for any of them:\n\n![](docs/bucket.png)\n\nThe list of permalinks is in the second table. It offers a link to open the file in a new tab and to revoke the permalink:\n\n![](docs/permalinks.png)\n\n## Under the hood\n\nThe permalink calls to the backend and it specifies the token as part of the path scheme (```/link/\u003ctoken\u003e```):\n\n![](docs/link.png)\n\nWhen a permalink is used, the request goes to the backend. It retrieves the DynamoDB item that corresponds to that token, signs a ```getObject``` URL and sends back a 303 HTTP redirect:\n\n![](docs/redirect_devtools.png)\n\n## Revocation\n\nThis construct offers an easy way to revoke permalinks as removing the item from the DynamoDB table invalidates the token. If a permalink is revoken it will return a 404:\n\n![](docs/revoken.png)\n\nThe books are from [Project Gutenberg](https://www.gutenberg.org/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsashee%2Fpermanent_signed_urls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsashee%2Fpermanent_signed_urls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsashee%2Fpermanent_signed_urls/lists"}