You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 20, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: docs/providers/pulumi/aws.mdx
+42Lines changed: 42 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -189,6 +189,13 @@ apis:
189
189
- api.example.com
190
190
description: An AWS API
191
191
192
+
# Apply configuration for nitric websites
193
+
cdn:
194
+
# A valid domain or subdomain for the CloudFront Distribution to use for the deployed websites endpoint
195
+
domain: cdn.example.com
196
+
# Skip CDN cache invalidation during deployments (defaults to false)
197
+
skip-cache-invalidation: true
198
+
192
199
# Configure your deployed services
193
200
config:
194
201
# How services without a type will be deployed
@@ -227,6 +234,41 @@ config:
227
234
provisioned-concurrency: 1
228
235
```
229
236
237
+
### Websites
238
+
239
+
When deploying [websites](/websites), Nitric will create a CloudFront Distribution that automatically provides a public URL for your website. This URL is not suitable for production use, and you should configure a custom domain for your website.
240
+
241
+
The Hosted Zone used to configure the custom domain must be created in Route53 before deploying your CloudFront distribution with a custom domain configuration.
242
+
243
+
- Purchase/Register a domain name with your domain registrar of choice.
244
+
- Navigate to https://us-east-1.console.aws.amazon.com/route53/v2/hostedzones in your Azure Portal
245
+
- Click `Create hosted zone`
246
+
- Enter a `Domain name` of your choice, this should be the domain name you purchased i.e. example.com
247
+
- Select Public Hosted Zone
248
+
- Click `Create hosted zone`
249
+
- Once the Hosted Zone is created, click on the `Go to resource` button
250
+
251
+
Now that the Hosted Zone is created, you need to configure your registrar (domain) or existing DNS (subdomain) to point at the new name servers created for the zone.
252
+
253
+
The configuration details are available on the `Records` tab within the `Hosted Zone` page. This step is different depending on your chosen domain registrar. Below are some general steps depending on whether your configuring the primary domain or a subdomain.
254
+
255
+
#### Domain
256
+
257
+
Your registrar (e.g. Namecheap, GoDaddy, Cloudflare, etc.) will allow you to change the name servers for you domain, sometimes this is called 'Custom DNS'. Add each of the name servers (NS records) from the Registrar setup dialog in the relevant config page for your registrar.
258
+
259
+
#### Subdomain
260
+
261
+
If you're configuring a subdomain e.g. app.yourdomain.com, you can simply add the NS records to your existing DNS configuration for the chosen subdomain. Typically, the config will look something like this:
262
+
263
+
<Note>Substitute your values for `Nameserver`</Note>
264
+
265
+
| Record Type | Nameserver |
266
+
| ----------- | ----------------------- |
267
+
| NS Record | ns-001.awsdns-60.net. |
268
+
| NS Record | ns-002.awsdns-49.co.uk. |
269
+
| NS Record | ns-003.awsdns-24.org. |
270
+
| NS Record | ns-004.awsdns-34.com. |
271
+
230
272
<Note>
231
273
Missing something? Let us know by raising an issue in
232
274
[GitHub](https://github.com/nitrictech/nitric) or by dropping us a line on
0 commit comments