{"id":32211138,"url":"https://github.com/rlauer6/orepan2-s3","last_synced_at":"2026-02-21T00:02:38.102Z","repository":{"id":279496263,"uuid":"939016695","full_name":"rlauer6/OrePAN2-S3","owner":"rlauer6","description":"An S3 + CloudFront DarkPAN using OrePAN2","archived":false,"fork":false,"pushed_at":"2025-10-21T13:32:38.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-22T06:47:49.611Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/rlauer6.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","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,"zenodo":null}},"created_at":"2025-02-25T21:23:52.000Z","updated_at":"2025-10-21T13:32:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"dcb47854-d3e0-43fe-88c3-cd2128d63636","html_url":"https://github.com/rlauer6/OrePAN2-S3","commit_stats":null,"previous_names":["rlauer6/orepan2-s3"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/rlauer6/OrePAN2-S3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlauer6%2FOrePAN2-S3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlauer6%2FOrePAN2-S3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlauer6%2FOrePAN2-S3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlauer6%2FOrePAN2-S3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rlauer6","download_url":"https://codeload.github.com/rlauer6/OrePAN2-S3/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlauer6%2FOrePAN2-S3/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29668637,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T23:24:07.480Z","status":"ssl_error","status_checked_at":"2026-02-20T23:24:06.202Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2025-10-22T06:47:27.228Z","updated_at":"2026-02-21T00:02:38.095Z","avatar_url":"https://github.com/rlauer6.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README\n\nThis is the README file for the `OrePAN2::S3` distribution. The intent\nof this project is to create a so-called DarkPAN mirror that is served\nfrom an S3 bucket behind a CloudFront distribution.  However, this\nproject can also support a website enabled S3 bucket without using\nCloudFront.\n\n# Prerequisites\n\n* An AWS account\n* An S3 bucket\n* A CloudFront distribution\n* ...and several Perl modules (see [requires](requires))\n\nYou should set up your S3 bucket and CloudFront distribution before\nproceeding. You can use this\n[project](https://github.com/rlauer6/s3-static-site) to set up your\ninfrastructure before proceeding. That project will explain how to\ncreate and secure your own private static website hosted on S3.  A\nscript is included in that project to help you create all of the AWS\nartifacts required.\n\n## Install this Distribution from CPAN\n\n```\ncpanm -v OrePAN2::S3\n```\n\nThis will install two `bash` scripts and a Perl script:\n\n| Script Name | Description |\n| ----------- | ----------- |\n| `orepan2-s3` | Used to add new distributions to your DarkPAN | \n| `orepan2-s3-index` | Called by `orepan2-s3` to create an `index.html` |\n| `orepan2-s3.pl` | Called by `orepan2-s3` to index and create your website |\n\n## `.orepan2-s3.json`\n\nSet up a configuration file that will be used by the scripts. If you\nrun `orepan2-s3` the first time and there is no configuration, a\ndefault configuration will be installed in your home directory that\nlooks something like this:\n\n```\n{\n \"default\": {\n    \"AWS\": {\n        \"profile\" : \"prod\",\n        \"region\" : \"us-east-1\",\n        \"bucket\" : \"my-bucket\",\n        \"prefix\" : \"orepan2\"\n    },\n    \"CloudFront\" : {\n        \"DistributionId\" : \"**************\"\n    }\n }\n}\n```\n\nNote this is the minimum configuration. See `perldoc OrePAN::S3` for\nmore configuration file options.\n\nIf you are not using a CloudFront distribution (see below), remove or set the\nDistributionId to \"\".\n\n# Adding a New Distribution to Your DarkPAN\n\n```\norepan2-s3 add {tarball}\n```\n\nExample:\n\n```\norepan2-s3 add OrePAN2-S3-0.01.tar.gz\n```\n\nWhen you add a file to the DarkPAN repository the script will:\n\n* Upload the file to your S3 bucket\n* Update the package index\n* Create a default F\u003c/index.html\u003e page the shows all of your\n  distributions\n* Invalidate the CloudFront cache if you are using CloudFront\n\nBy default, the script invalidates the CloudFront cache if it finds a\nDistributionId in your configuration. You'll need to invalidate the\ncache in order to see your updates to the `index.html` and the DarkPAN\nindex.  If you don't need to do that because your TTL on your\nCloudFront distribution is fairly low, use the `-x` option to prevent\nthe script from invalidating the cache.\n\nKeep in mind that AWS gives you 1000 invalidations/month for free\nafter which you pay $.005 per invalidation request. More than one file\ncan be included in each request. The script will invalidate at least 4\npaths on each invalidation request:\n\n* `/index.html`\n* `/orepan2/02package.details.text.gz`\n* `/orepan2/orepan2-cache.json`\n* the distribution you just uploaded\n\n## The Default Index\n\nA default index page is created for you from a template embedded in\nthe script. To view the default template:\n\n```\norepan2-index dump-template\n```\n\nIf you want to create your own template you can provide that using the\nC\u003c--template\u003e option or set the `template` key in your\nconfiguration. See C\u003cperldoc OrePAN2::S3\u003e for more details.\n\n# Using a Website Enabled S3 Bucket\n\nAs explained\n[here](https://blog.tbcdevelopmentgroup.com/2025-02-18-post.html),\nthere are many ways to create static websites. One such way is to use\na feature of S3 that allows you to serve content directly from the\nbucket. In order to use HTTPS however, you would need to front the\nbucket using CloudFront and optionally install your own certificate\nand domain name.\n\nIf you don't want or need that kind of security and simply want to\nplow ahead with an insecure public bucket, you can do so. In that case\nyou might want to at least create a bucket policy to restrict the IPs\naddresses that can access your bucket. Caveat Emptor.\n\nTo use an insecure bucket, simply remove the DistributionId from the\nconfiguration file.\n\nYou'll find a script [here](bin/create-insecure-bucket) that will\nallow you to create your insecure website enabled bucket.\n\n## WARNING!\n\nTake a look at this [blog\npost](https://blog.tbcdevelopmentgroup.com/2025-02-21-post.html)\nbefore you blithely lock down your S3 bucket using an IP address.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frlauer6%2Forepan2-s3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frlauer6%2Forepan2-s3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frlauer6%2Forepan2-s3/lists"}