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
docs: update AWS RDS IAM Auth instructions (#1421)
The IAM Auth configuration only needs to be applied to the frontend
service(s), not all services requiring database connections. This
update:
- Clarifies that config is only needed for sourcegraph-frontend service
- Adds missing CODEINTEL_PGHOST variable for completeness
- Documents AWS_STS_REGIONAL_ENDPOINTS as optional configuration for
customers who want to use regional STS endpoints for improved latency
and resiliency (common in production AWS deployments)
NOTE: This can only be merged once our backport lands for these
improvements sourcegraph/sourcegraph#7825
Amp-Thread-ID:
https://ampcode.com/threads/T-27ca9536-a526-45bd-9992-f9011dbf5cff
Co-authored-by: Amp <[email protected]>
Co-authored-by: Warren Gifford <[email protected]>
Copy file name to clipboardExpand all lines: docs/admin/external_services/postgres.mdx
+22-17Lines changed: 22 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -144,23 +144,28 @@ In order to enable IAM Auth, you first need to:
144
144
- For EKS (k8s deployment), use [IAM roles for service accounts](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html)
145
145
- For EC2 (docker-compose deployment), use [IAM roles for Amazon EC2](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html)
146
146
147
-
For [every services that require postgres database connection](https://github.com/sourcegraph/sourcegraph-public-snapshot/blob/main/lib/servicecatalog/service-catalog.yaml), ensure below environment variables are configured:
148
-
149
-
- `PG_CONNECTION_UPDATER=EC2_ROLE_CREDENTIALS`
150
-
- `PGSSLMODE=require`
151
-
- `PGHOST=<>`
152
-
- `PGPORT=<>`
153
-
- `PGUSER=<>`- this should be the database accounts created above
154
-
- `PGDATABASE=<>`
155
-
- `CODEINTEL_PGSSLMODE=require`
156
-
- `CODEINTEL_PGPORT=<>`
157
-
- `CODEINTEL_PGUSER=<>`this should be the database accounts created above
158
-
- `CODEINTEL_PGDATABASE=<>`
159
-
- `CODEINSIGHTS_PGSSLMODE=require`
160
-
- `CODEINSIGHTS_PGHOST=<>`
161
-
- `CODEINSIGHTS_PGPORT=<>`
162
-
- `CODEINSIGHTS_PGUSER=<>`this should be the database accounts created above
163
-
- `CODEINSIGHTS_PGDATABASE=<>`
147
+
Configure the following environment variables for the **`sourcegraph-frontend`** service (or all `sourcegraph-frontend-*` services in Docker Compose deployments):
148
+
149
+
- `PG_CONNECTION_UPDATER=EC2_ROLE_CREDENTIALS`
150
+
- `PGSSLMODE=require`
151
+
- `PGHOST=<>`
152
+
- `PGPORT=<>`
153
+
- `PGUSER=<>`- this should be the database accounts created above
154
+
- `PGDATABASE=<>`
155
+
- `CODEINTEL_PGSSLMODE=require`
156
+
- `CODEINTEL_PGHOST=<>`
157
+
- `CODEINTEL_PGPORT=<>`
158
+
- `CODEINTEL_PGUSER=<>`- this should be the database accounts created above
159
+
- `CODEINTEL_PGDATABASE=<>`
160
+
- `CODEINSIGHTS_PGSSLMODE=require`
161
+
- `CODEINSIGHTS_PGHOST=<>`
162
+
- `CODEINSIGHTS_PGPORT=<>`
163
+
- `CODEINSIGHTS_PGUSER=<>`- this should be the database accounts created above
164
+
- `CODEINSIGHTS_PGDATABASE=<>`
165
+
166
+
**Optional:** If your workloads are in a specific AWS Region and you want to use regional STS endpoints for improved latency and resiliency, also set:
167
+
168
+
- `AWS_STS_REGIONAL_ENDPOINTS=regional`- This configures the AWS SDK to use regional STS endpoints (e.g., `sts.us-west-2.amazonaws.com`) instead of the global endpoint (`sts.amazonaws.com`). This is recommended for better performance and resilience. See [AWS documentation](https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html) for more details.
0 commit comments