{"id":27093771,"url":"https://github.com/schwamster/serverless-certificate-creator","last_synced_at":"2025-10-08T09:06:43.580Z","repository":{"id":39526515,"uuid":"150218642","full_name":"schwamster/serverless-certificate-creator","owner":"schwamster","description":"serverless plugin to manage the certificate of your lambdas custom domain (API Gateway=","archived":false,"fork":false,"pushed_at":"2024-05-10T14:21:38.000Z","size":69,"stargazers_count":35,"open_issues_count":23,"forks_count":23,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T22:07:30.053Z","etag":null,"topics":["api-gateway","certificate","lambda","serverless","serverless-plugin"],"latest_commit_sha":null,"homepage":"","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/schwamster.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":null}},"created_at":"2018-09-25T06:36:01.000Z","updated_at":"2024-07-27T13:06:29.000Z","dependencies_parsed_at":"2024-06-18T19:51:39.183Z","dependency_job_id":"b8126b47-69ff-48b1-be18-3772b7430118","html_url":"https://github.com/schwamster/serverless-certificate-creator","commit_stats":{"total_commits":84,"total_committers":11,"mean_commits":7.636363636363637,"dds":0.2142857142857143,"last_synced_commit":"2e029f8e017041b53a00f4b81389e8333f9777c9"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schwamster%2Fserverless-certificate-creator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schwamster%2Fserverless-certificate-creator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schwamster%2Fserverless-certificate-creator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schwamster%2Fserverless-certificate-creator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schwamster","download_url":"https://codeload.github.com/schwamster/serverless-certificate-creator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247457748,"owners_count":20941906,"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":["api-gateway","certificate","lambda","serverless","serverless-plugin"],"created_at":"2025-04-06T08:49:59.491Z","updated_at":"2025-10-08T09:06:38.540Z","avatar_url":"https://github.com/schwamster.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# serverless-certificate-creator\n\n[![serverless](http://public.serverless.com/badges/v3.svg)](http://www.serverless.com)\n[![npm version](https://badge.fury.io/js/serverless-certificate-creator.svg)](https://badge.fury.io/js/serverless-certificate-creator)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/amplify-education/serverless-domain-manager/master/LICENSE)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/235fe249b8354a3db0cc5926dba47899)](https://www.codacy.com/app/CFER/serverless-certificate-creator?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=schwamster/serverless-certificate-creator\u0026utm_campaign=badger)\n[![npm downloads](https://img.shields.io/npm/dt/serverless-certificate-creator.svg?style=flat)](https://www.npmjs.com/package/serverless-certificate-creator)\n[![CircleCI](https://circleci.com/gh/schwamster/serverless-certificate-creator/tree/master.svg?style=svg)](https://circleci.com/gh/schwamster/serverless-certificate-creator/tree/master)\n\n# Table of Contents\n\n- [Description](#description)\n- [Serverless Framework](#serverless-framework)\n- [Usage Requirements](#usage-requirements)\n- [Usage](#usage)\n- [Combine with serverless-domain-manager](#combine-with-serverless-domain-manager)\n  * [Examples](#examples)\n- [License](#license)\n\n# Description\n\nThis serverless plugin creates certificates that you need for your custom domains in API Gateway.\nUse this in your CICD flow to automatically create a certificate, create the necessary route53 recordsets to validate the certificate with Dns-Validation and finally wait until the certificate has been validated.\n\n# Serverless Framework\n\nThis package is made for the [serverless framework](https://serverless.com).\n\nYou can install it like this:\n\n```bash\n# Install the serverless cli\nnpm install -g serverless\n\n# Or, update the serverless cli from a previous version\nnpm update -g serverless\n```\n\nCheck out their getting started guide for more information [here](https://serverless.com/framework/docs/getting-started/).\n\n# Usage Requirements\n\nMake sure you have the following installed before starting:\n* [nodejs](https://nodejs.org/en/download/)\n* [npm](https://www.npmjs.com/get-npm?utm_source=house\u0026utm_medium=homepage\u0026utm_campaign=free%20orgs\u0026utm_term=Install%20npm)\n* [serverless](https://serverless.com/framework/docs/providers/aws/guide/installation/)  \u003e= v1.52.0\n\n# Usage\n\n        npm i serverless-certificate-creator --save-dev\n\nopen serverless.yml and add the following:\n\n        plugins:\n        - serverless-certificate-creator\n\n        ...\n\n        custom:\n            customCertificate:\n                //required\n                certificateName: 'abc.somedomain.io'\n                //optional\n                idempotencyToken: 'abcsomedomainio'\n                //required if hostedZoneIds is not set, alternativly as an array\n                hostedZoneNames: 'somedomain.io.' \n                //required if hostedZoneNames is not set\n                hostedZoneIds: 'XXXXXXXXX'\n                // optional default is false. if you set it to true you will get a new file (after executing serverless create-cert), that contains certificate info that you can use in your deploy pipeline, alternativly as an array\n                writeCertInfoToFile: false \n                // optional, only used when writeCertInfoToFile is set to true. It sets the name of the file containing the cert info\n                certInfoFileName: 'cert-info.yml' \n                // optional - default is us-east-1 which is required for custom api gateway domains of Type Edge (default)\n                region: eu-west-1\n                //optional - see SubjectAlternativeNames https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/ACM.html#requestCertificate-property\n                subjectAlternativeNames : \n                    - 'www.somedomain.io'\n                    - 'def.somedomain.io'\n                //optional - see https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/ACM.html#addTagsToCertificate-property\n                //if you want to give your certificate a name that is shown in the ACM Console you can add a Tag with the key \"Name\"\n                tags:\n                    Name: 'somedomain.com'\n                    Environment: 'prod'\n                //optional default false. this is useful if you managed to delete your certificate but the dns validation records still exist\n                rewriteRecords: false\n\n\nnow you can run:\n\n        serverless create-cert\n\nTo remove the certificate and delete the CNAME recordsets from route53, run:\n\n        serverless remove-cert\n\n# Combine with serverless-domain-manager\n\nIf you combine this plugin with [serverless-domain-manager](https://github.com/amplify-education/serverless-domain-manager) you can automate the complete process of creating a custom domain with a certificate.\nI found serverless-domain-manager very useful but i also wanted to be able to automatically create the certificate for the newly generated custom domain.\n\n\n## Examples\n\nInstall the plugins:\n\n        npm i serverless-certificate-creator --save-dev\n        npm i serverless-domain-manager --save-dev\n\nOpen serverless.yml and add the following:\n\n        plugins:\n        - serverless-certificate-creator\n        - serverless-domain-manager\n\n        ...\n\n        custom:\n            customDomain:\n                domainName: abc.somedomain.io\n                certificateName: 'abc.somedomain.io'\n                basePath: ''\n                stage: ${self:provider.stage}\n                createRoute53Record: true\n            customCertificate:\n                certificateName: 'abc.somedomain.io' //required\n                idempotencyToken: 'abcsomedomainio' //optional\n                hostedZoneNames: 'somedomain.io.' //required if hostedZoneIds is not set \n                hostedZoneIds: 'XXXXXXXXX' //required if hostedZoneNames is not set\n                region: eu-west-1 // optional - default is us-east-1 which is required for custom api gateway domains of Type Edge (default)\n                enabled: true // optional - default is true. For some stages you may not want to use certificates (and custom domains associated with it).\n                rewriteRecords: false\n\nNow you can run:\n\n        serverless create-cert\n        serverless create_domain\n\nPlease make sure to check out the complete sample project [here](https://github.com/schwamster/serverless-certificate-creator/tree/master/examples/certificate-creator-example).\n\n### Reference Certificate Arn via variableResolvers\n\nSince version 1.2.0 of this plugin you can use the following syntax to access the certificates Arn in other plugins\n\n        ${certificate:${self:custom.customCertificate.certificateName}:CertificateArn}\n\nIf you are on version \u003e= 2.27.0 of serverless \u0026 have elected to use the variable resolver: `variablesResolutionMode: 20210219`.\nYou must use this supported syntax which is:\n\n        ${certificate:${self:custom.customCertificate.certificateName}.CertificateArn}\n\nFor the new variable resolver: `variablesResolutionMode: 20210326`:\nThe new supported syntax is:\n\n        ${certificate(${self:custom.customCertificate.certificateName}):CertificateArn}\n\nsee the serverless [docs](https://serverless.com/framework/docs/providers/aws/guide/plugins#custom-variable-types) for more information\n\n### License\n\nCopyright (c) 2018 Bastian Töpfer, contributors.\n\nReleased under the [MIT license](https://tldrlegal.com/license/mit-license).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschwamster%2Fserverless-certificate-creator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschwamster%2Fserverless-certificate-creator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschwamster%2Fserverless-certificate-creator/lists"}