HTTPS
This guide shows how to support HTTPS traffic to Cortex APIs via a custom domain. It is also possible to use AWS API Gateway to enable HTTPS without using your own domain (see here for instructions).
In order to create a valid SSL certificate for your domain, you must have the ability to configure DNS to satisfy the DNS challenges which prove that you own the domain. This guide assumes that you are using a Route 53 hosted zone to manage a subdomain. Follow this guide to set up a subdomain managed by a Route 53 hosted zone.
Generate an SSL certificate
To create an SSL certificate, go to the ACM console and click "Get Started" under the "Provision certificates" section.
![](https://docs.cortexlabs.com/~gitbook/image?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F4365343%2F82202340-c04ac800-98cf-11ea-9472-89dd6d67eb0d.png&width=768&dpr=4&quality=100&sign=117dd927&sv=1)
Select "Request a public certificate" and then "Request a certificate".
![](https://docs.cortexlabs.com/~gitbook/image?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F4365343%2F82202654-3e0ed380-98d0-11ea-8c57-025f0b69c54f.png&width=768&dpr=4&quality=100&sign=dd10fe0d&sv=1)
Enter your subdomain and then click "Next".
![](https://docs.cortexlabs.com/~gitbook/image?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F4365343%2F82224652-1cbedf00-98f2-11ea-912b-466cee2f6e25.png&width=768&dpr=4&quality=100&sign=74e8867e&sv=1)
Select "DNS validation" and then click "Next".
![](https://docs.cortexlabs.com/~gitbook/image?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F4365343%2F82205311-66003600-98d4-11ea-90e3-da7e8b0b2b9c.png&width=768&dpr=4&quality=100&sign=1a15d6a&sv=1)
Add tags for searchability (optional) then click "Review".
![](https://docs.cortexlabs.com/~gitbook/image?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F4365343%2F82206485-52ee6580-98d6-11ea-95a9-1d0ebafc178a.png&width=768&dpr=4&quality=100&sign=b2b4dd01&sv=1)
Click "Confirm and request".
![](https://docs.cortexlabs.com/~gitbook/image?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F4365343%2F82206602-84ffc780-98d6-11ea-9f2f-ce383404ec67.png&width=768&dpr=4&quality=100&sign=98cb10c7&sv=1)
Click "Create record in Route 53". A popup will appear indicating that a Record is going to be added to Route 53. Click "Create" to automatically add the DNS record to your subdomain's hosted zone. Then click "Continue".
![](https://docs.cortexlabs.com/~gitbook/image?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F4365343%2F82223539-c8ffc600-98f0-11ea-93a2-044aa0c9670d.png&width=768&dpr=4&quality=100&sign=df8d8c9d&sv=1)
Wait for the Certificate Status to be "issued". This might take a few minutes.
![](https://docs.cortexlabs.com/~gitbook/image?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F4365343%2F82209663-a616e700-98db-11ea-95cb-c6efedadb942.png&width=768&dpr=4&quality=100&sign=2ec0d1&sv=1)
Take note of the certificate's ARN. The certificate is ineligible for renewal because it is currently not being used. It will be eligible for renewal once it's used in Cortex.
![](https://docs.cortexlabs.com/~gitbook/image?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F4365343%2F82222684-9e613d80-98ef-11ea-98c0-5a20b457f062.png&width=768&dpr=4&quality=100&sign=6ab6efc8&sv=1)
Create or update your cluster
Add the following field to your cluster configuration:
Create a cluster:
Or update an existing cluster:
Use your new endpoint
Wait a few minutes to allow the DNS changes to propagate. You may now use your subdomain in place of your API load balancer endpoint in your client. For example, this curl request:
Would become:
Cleanup
Spin down your Cortex cluster.
If you created an SSL certificate, delete it from the ACM console:
Last updated