- #Npm serverless domain manager how to#
- #Npm serverless domain manager install#
- #Npm serverless domain manager manual#
Based on already created certificate names, the plugin will search for the certificate that resembles the custom domain's name the most and assign the ARN to that domain name. When autoDomain is set to true, and a deployment is removed, setting this to true checks for additional API Gateway base path mappings before automatically deleting the domain, and avoids doing so if they exist.Ĭreating the custom domain takes advantage of Amazon's Certificate Manager to assign a certificate to the given domain name. If it is not provided, no health check will be associated with the record. Only relevant for latency and weighted routing. If it is failing, Route 53 will stop routing to it. Defaults to the regional endpoint if not provided.Īn optional id for a Route 53 health check.
Ignored for simple and latency routing.Ī unique identifier for records in a set of Route 53 records with the same domain name. If createRoute53Record is false, anything passed here will be ignored.ĭefines the Route 53 routing policy, accepts simple, latency or weighted. If left empty, A and AAAA records with simple routing will be created. How long to wait for create_domain to finish before starting deployment if domain does not exist immediately.Ī set of options to customize Route 53 record creation. Toggles whether or not the plugin will run create_domain/delete_domain as part of sls deploy/remove so that multiple commands are not required. See Changing API Types for more information. For example, migrating a REST API to an HTTP API. This should only be used when changing API types. When updating an existing api mapping this will match on the basePath instead of the API ID to find existing mappings for an update. The security policy to apply to the custom domain name. Accepts either boolean or string values and defaults to true for backwards compatibility. This flag allows the developer to disable the plugin for such cases. Sometimes there are stages for which is not desired to have custom domain names. Setting this parameter is specially useful if you have multiple hosted zones with the same domain name (e.g. If it is set to false then only public hosted zones will be used for route53 records. If hostedZonePrivate is set to true then only private hosted zones will be used for route 53 records. If hostedZoneId is set the route53 record set will be created in the matching zone, otherwise the hosted zone will be figured out from the domainName (hosted zone with matching domain). Region to send Route53 services requests to (only applicable if also using route53Profile option)ĭefines the endpoint type, accepts regional or edge.ĭefines the api type, accepts rest, http or websocket. Profile to use for accessing Route53 resources when Route53 records are in a different account Toggles whether or not the plugin will create an AAAA Alias record in Route53 mapping the domainName to the generated distribution domain name. Toggles whether or not the plugin will create A Alias and AAAA Alias records in Route53 mapping the domainName to the generated distribution domain name. The arn of a specific certificate from Certificate Manager to use with this API.
Note: Edge-optimized endpoints require that the certificate be located in us-east-1 to be used with the CloudFront distribution. for a given domain name, a certificate for will take precedence over a *. certificate). If not specified, the closest match will be used (i.e. The name of a specific certificate from Certificate Manager to use with this API.
This parameter allows you to specify a different stage for the domain name than the stage specified for the serverless deployment. Value of -stage, or provider.stage (serverless will default to dev if unset) The base path that will prepend all API endpoints.
The domain name to be created in API Gateway and Route53 (if enabled) for this API. But, the certificate creation process is well explained with snapshots.Ĥ.DomainName: stage: ci basePath: api certificateName: '*.foo.com ' createRoute53Record: true endpointType: 'regional ' securityPolicy: tls_1_2 route53Params: P.S: I wrote this article based on the ambiguities I see in this article.
#Npm serverless domain manager how to#
If you are unsure how to generate a free SSL certificate, please read this. Certificate name - must be a name registered in your AWS region with a valid SSL certificate.
#Npm serverless domain manager manual#
Set the createRoute53Record to true so that you don’t need to take any manual action in Route53 This is one very important factor not mentioned anywhere The lambda when deployed will have the endpoint type as Edge by default. Custom section with the custom domain mapping
#Npm serverless domain manager install#
Npm install serverless-domain-manager - save-devģ. You need to run below command to add the plugin entry into yml This is like any other plugin with serverless - Ģ. Plugin for the serverless-domain-manager.