@@ -7,6 +7,7 @@ This guide explains how to configure dstack-ingress to work with different DNS p
77- ** Cloudflare** - The original and default provider
88- ** Linode DNS** - For Linode-hosted domains
99- ** Namecheap** - For Namecheap-hosted domains
10+ - ** Route53** - For AWS hosted domains
1011
1112## Environment Variables
1213
@@ -73,6 +74,37 @@ NAMECHEAP_CLIENT_IP=your-client-ip
7374- Namecheap doesn't support CAA records through their API currently
7475- The certbot plugin uses the format ` certbot-dns-namecheap ` package
7576
77+ ### Route53
78+
79+ ``` bash
80+ DNS_PROVIDER=route53
81+ AWS_PROFILE=your-injected-aws-profile
82+ ```
83+
84+ ** Required Permissions:**
85+ ``` yaml
86+ PolicyDocument :
87+ Version : ' 2012-10-17'
88+ Statement :
89+ - Sid : AllowDnsChallengeChanges
90+ Effect : Allow
91+ Action :
92+ - route53:ChangeResourceRecordSets
93+ Resource : !Sub arn:aws:route53:::hostedzone/${HostedZoneId}
94+ - Sid : AllowListingForDnsChallenge
95+ Effect : Allow
96+ Action :
97+ - route53:ListHostedZonesByName
98+ - route53:ListHostedZones
99+ - route53:GetChange
100+ - route53:ListResourceRecordSets
101+ ` ` `
102+
103+ **Important Notes for Route53:**
104+ - The certbot plugin uses the format ` certbot-dns-route53` package
105+ - CAA will merge AWS & Let's Encrypt CA domains to existing records if they exist
106+ - It is recommended that the AWS service account can only assume the limited role. See cloudformation example.
107+
76108# # Docker Compose Examples
77109
78110# ## Linode Example
@@ -127,6 +159,51 @@ services:
127159 - ./evidences:/evidences
128160` ` `
129161
162+ # ## Route53 Example
163+
164+ ` ` ` yaml
165+ services:
166+ dstack-ingress:
167+ image: dstack-ingress:latest
168+ restart: unless-stopped
169+ volumes:
170+ - /var/run/dstack.sock:/var/run/dstack.sock
171+ - cert-data:/etc/letsencrypt
172+ ports:
173+ - 443:443
174+ configs:
175+ - source: aws_config
176+ target: /root/.aws/config
177+ mode: 0600
178+ - source: aws_credentials
179+ target: /root/.aws/credentials
180+ mode: 0600
181+ environment:
182+ DNS_PROVIDER: route53
183+ DOMAIN: app.example.com
184+ GATEWAY_DOMAIN: _.${DSTACK_GATEWAY_DOMAIN}
185+
186+ CERTBOT_EMAIL: ${CERTBOT_EMAIL}
187+ TARGET_ENDPOINT: http://backend:8080
188+
189+ AWS_PROFILE: certbot
190+ SET_CAA: 'true'
191+
192+ configs:
193+ aws_config:
194+ content: |
195+ [profile certbot]
196+ role_arn=${ROUTE53_AWS_ROLE_ARN}
197+ source_profile=certbot-source
198+ region=${AWS_REGION}
199+
200+ aws_credentials:
201+ content: |
202+ [certbot-source]
203+ aws_access_key_id=${ROUTE53_AWS_ACCESS_KEY_ID}
204+ aws_secret_access_key=${ROUTE53_AWS_SECRET_ACCESS_KEY}
205+ ` ` `
206+
130207# # Migration from Cloudflare-only Setup
131208
132209If you're currently using the Cloudflare-only version :
@@ -166,4 +243,4 @@ Ensure your API tokens/credentials have the necessary permissions listed above f
1662431. Go to https://ap.www.namecheap.com/settings/tools/api-access/
1672442. Enable API access for your account
1682453. Note down your API key and username
169- 4. Make sure your IP address is whitelisted in the API settings
246+ 4. Make sure your IP address is whitelisted in the API settings
0 commit comments