For more flexible hosting, you can deploy to AWS. The recommended architecture is to use S3 for storage, CloudFront as a CDN to reduce latency, and Route 53 for domain management.
AWS Setup Steps
- S3: Create a bucket (ideally named after your domain). Disable 'Block all public access' via ACLs and enable 'Static website hosting'.
- CloudFront: Create a distribution.
- Origin Domain Name: Use your S3 website URL (without
http://). - Default Root Object: Set to
index.html. - CNAMEs: Add your target domain name.
- SSL: Use an SSL certificate from AWS Certificate Manager.
- Route 53: Create a 'Hosted Zone' and a 'Type-A Record Set' that uses your CloudFront domain name as the alias target.
Configuration
In your config.ini file, specify the S3 bucket URI under the [deploy] section.
Deployment
Run d2lbook deploy to synchronize all results to the specified S3 bucket. Note that due to CDN caching, changes may take a few minutes to appear on your custom domain, though they will appear immediately on the S3 website URL.
[deploy]
s3_bucket = s3://book.d2l.ai
d2lbook deploy