{"id":16993471,"url":"https://github.com/sthzg/serverless-domain-forwarder","last_synced_at":"2026-05-19T09:32:21.454Z","repository":{"id":79110950,"uuid":"124448001","full_name":"sthzg/serverless-domain-forwarder","owner":"sthzg","description":"Serverless Template to Forward (Sub)-Domains","archived":false,"fork":false,"pushed_at":"2018-03-12T15:22:11.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T22:51:43.413Z","etag":null,"topics":["aws","aws-lambda","redirect-urls","serverless","serverless-framework","serverless-template"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/sthzg.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-08T21:04:55.000Z","updated_at":"2018-03-10T10:40:31.000Z","dependencies_parsed_at":"2023-06-01T12:15:13.323Z","dependency_job_id":null,"html_url":"https://github.com/sthzg/serverless-domain-forwarder","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/sthzg%2Fserverless-domain-forwarder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sthzg%2Fserverless-domain-forwarder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sthzg%2Fserverless-domain-forwarder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sthzg%2Fserverless-domain-forwarder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sthzg","download_url":"https://codeload.github.com/sthzg/serverless-domain-forwarder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244909432,"owners_count":20530231,"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":["aws","aws-lambda","redirect-urls","serverless","serverless-framework","serverless-template"],"created_at":"2024-10-14T03:43:15.259Z","updated_at":"2026-05-19T09:32:21.420Z","avatar_url":"https://github.com/sthzg.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# serverless-domain-forwarder\n\nThis is a simple [☞ Serverless][0] template that creates a stack that\nforwards configured (sub)domains to a new location.\n\n## AWS Stack\n\n- Lambda function to respond with a 301 response\n- Api Gateway with two GET routes `/` and `/{any+}`\n- CloudFront distribution to route requests to api gateway\n\n## Usage\n\nWith the installed and configured serverless cli, the following\ncommand downloads the template to the local machine:\n\n```\nserverless create --template-url https://github.com/sthzg/serverless-domain-forwarder --path my-domain-forwarder\ncd my-domain-forwarder\nnpm install # or yarn\n```\n\nOpen `config.js` and configure the settings as specified. You can\ncheck an example response locally by running:\n\n```\nserverless invoke local -f forward\n```\n\nModify and extend the `serverless.yml` as desired. To deploy the\nservice to AWS simply run:\n\n```\nserverless deploy -v\n```\n\nNote: this can take a long time if the CloudFront distribution is\nsetup for the first time (or its settings have changed).\n\n## Certificates\n\nTo configure the CloudFront distribution to use a certificate created\nin AWS Certificate Manager, go to `serverless.yml` and change the\n`ViewerCertificate` configuration. [☞ AWS Reference Docs][1]\n\n```\n# Change from ...\nViewerCertificate:\n  CloudFrontDefaultCertificate: \"true\"\n\n# ... to\nViewerCertificate:\n  AcmCertificateArn: \u003carn:your-cert-arn\u003e\n  SslSupportMethod: sni-only\n```\n\n## Why Not Lambda@Edge on CloudFront\n\nCloudFront allows to route requests through a lambda function. These\nlambdas are currently required to be in the US region which may\nconflict with European GDPR rules. Using ApiGateway ensures control\nover the region for the time being.\n\n[0]: https://serverless.com/\n[1]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distributionconfig-viewercertificate.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsthzg%2Fserverless-domain-forwarder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsthzg%2Fserverless-domain-forwarder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsthzg%2Fserverless-domain-forwarder/lists"}