{"id":23472997,"url":"https://github.com/caltechlibrary/persistent_url_resolver","last_synced_at":"2026-03-08T18:36:25.519Z","repository":{"id":111429284,"uuid":"112645318","full_name":"caltechlibrary/persistent_url_resolver","owner":"caltechlibrary","description":"This repository contains a new version of Caltech Library's Persistent URL Resolver, based on AWS S3.","archived":false,"fork":false,"pushed_at":"2024-06-26T21:51:39.000Z","size":3730,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-06-27T01:48:31.397Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/caltechlibrary.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"codemeta.json"}},"created_at":"2017-11-30T18:22:51.000Z","updated_at":"2024-06-26T21:51:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"327229b7-86a3-4b69-9910-bfbee33797f2","html_url":"https://github.com/caltechlibrary/persistent_url_resolver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caltechlibrary%2Fpersistent_url_resolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caltechlibrary%2Fpersistent_url_resolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caltechlibrary%2Fpersistent_url_resolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caltechlibrary%2Fpersistent_url_resolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caltechlibrary","download_url":"https://codeload.github.com/caltechlibrary/persistent_url_resolver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231129059,"owners_count":18332185,"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":[],"created_at":"2024-12-24T17:14:40.685Z","updated_at":"2026-03-08T18:36:25.514Z","avatar_url":"https://github.com/caltechlibrary.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Persistent URL Resolver\n\nResolve existing Persistent URLs in Eprints and Caltech Library DOIs using AWS\nS3. At Caltech this is installed and runs on the betawork server.\n\n## Install\n\nWe use uv to manage python dependencies. Create a local venv with `uv venv` and then\ninstall dependencies with `uv pip install -r requirements.txt`\n\n## Setup\n\nCreate a S3 bucket using the AWS console, say resolver.library.caltech.edu.\nYou can turn on logging if you like.  For now turn off all public access\nrestrictions (we don't care if people can read bucket contents).  Then go to\nbucket properties and turn on static website hosting (use index.html as the\ndocument root and error.html as the error location).  \nThen under permissions add public access for \"List objects\".\n\nGo to AWS IAM and select policies.  Create a new policy that allows S3 access\nto only the resolver.library.caltech.edu bucket and any object.  \nSet up a user in AWS AIM (I created a new user \"resolver\"), and provide it only\nprogrammatic access (no need for it to have a password).  Select \"Attach\nexisting policies dierectly\", and select the policy you just created. Create\nthe user and you'll get credentials.  Edit ~/.aws/credentials and add\n\n    [resolver]   \n    aws_secret_access_key = \n    aws_access_key_id =   \n\nresolver is the profile we'll use to hold these credentials.  You should have\nin ~/.aws/config\n\n[default]\nregion = us-west-2\n\nor whatever AWS region you're using.  \n\nCopy error.html, logos, and css.css to the S3 bucket.\n\nIn order to get https, we need to set up a cloudfront distribution.  First go\nto S3 settings under static website hosting and copy the domain name - it will\nbe something like\n\"resolver.library.caltech.edu.s3-website-us-west-2.amazonaws.com\".\nNow go to cloudfront in AWS and create a Web distribution.\nPaste the S3 url as Origin Domain Name- do not use the default S3 autocomplete.  \nFor now allow both HTTP and HTTPS.  All the defaults should be fine.\nNote that it may take awhile to deploy your site if you have many objects. \n\n## Operation\n\nIf you need to manually add a resolver link, you can use the `resolver_link.py`\n script. You provide the resolver name, the url, and a message for the log. \n `python change_resolver_link.py CaltechBOOK:1984.001 https://authors.library.caltech.edu/25061/ \"Capitalization\"`\n\nThe `resolver.py` script automates setting up the resolver.  `python\nresolver.py` will find resolver links in Eprints repositories and upload them\nto S3. Normally only new links are added, but if you want to update all the\nlinks add the `-update` flag.  This will take many hours. If you want to update\nDOI links, add the `-dois` flag.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaltechlibrary%2Fpersistent_url_resolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaltechlibrary%2Fpersistent_url_resolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaltechlibrary%2Fpersistent_url_resolver/lists"}