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
@@ -38,7 +39,154 @@ If you are unfamiliar with LiteLLM, it provides a consistent interface to access
38
39
5. External model providers providers (OpenAI, Anthropic, Vertex AI etc.) are configured using LiteLLM Admin UI to enable additional LLM model access via unified application interface. Pre-existing configurations of third-party providers are integrated into the Gateway using LiteLLM APIs.
39
40
6. LiteLLM integrates with [Amazon ElastiCache (Redis OSS)](https://aws.amazon.com/elasticache/), [Amazon Relational Database Service (RDS)](https://aws.amazon.com/rds/), and [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/) services. Amazon ElastiCache enables multi-tenant distribution of application settings and prompt caching. Amazon RDS enables persistence of virtual API keys and other configuration settings provided by LiteLLM. AWS Secrets Manager stores external model provider credentials and other sensitive settings securely.
40
41
7. LiteLLM and the API/middleware store application logs in the dedicated [Amazon S3](https://aws.amazon.com/s3) storage bucket for troubleshooting and access analysis.
41
-
42
+
43
+
## Distribution Options
44
+
45
+
Starting with version 1.1.0, this solution supports flexible deployment scenarios to meet various security and accessibility requirements. You can customize how your LiteLLM gateway is accessed based on your specific needs.
46
+
47
+
### Deployment Scenarios
48
+
49
+
#### Scenario 1: Default - Public with CloudFront (Recommended)
50
+
```bash
51
+
USE_CLOUDFRONT="true"
52
+
USE_ROUTE53="false"
53
+
PUBLIC_LOAD_BALANCER="true"
54
+
```
55
+
56
+
**Why choose this scenario:**
57
+
- Global performance with low-latency access via CloudFront's edge locations
58
+
- Enhanced security with AWS Shield Standard DDoS protection
59
+
- Simplified HTTPS management with CloudFront's default certificate
60
+
- Best option for public-facing AI services with global user base
61
+
62
+
**Security:**
63
+
- CloudFront IP filtering restricts ALB access to only CloudFront traffic
64
+
- WAF can be applied at the CloudFront level (requires global WAF)
65
+
- Simpler certificate management using CloudFront's default certificate
- Maximum security for internal enterprise applications
125
+
- Complete isolation from public internet
126
+
- Suitable for processing sensitive or proprietary data
127
+
128
+
**Access methods:**
129
+
- VPN connection to the VPC
130
+
- AWS Direct Connect
131
+
- VPC peering with corporate network
132
+
- Transit Gateway
133
+
134
+
**Security considerations:**
135
+
- No public internet access possible
136
+
- ALB security group only allows traffic from private subnet CIDRs
137
+
- Requires network connectivity to the VPC for access
138
+
139
+
**Access URL:**`https://genai.example.internal` (resolves only within VPC or connected networks)
140
+
141
+
### Configuration Quick Reference
142
+
143
+
| Parameter | Default | Description |
144
+
|-----------|---------|-------------|
145
+
|`USE_CLOUDFRONT`|`true`| Enables CloudFront distribution for global delivery |
146
+
|`USE_ROUTE53`|`false`| Enables Route53 for custom domain support |
147
+
|`PUBLIC_LOAD_BALANCER`|`true`| Deploys ALB in public subnets |
148
+
|`CLOUDFRONT_PRICE_CLASS`|`PriceClass_100`| CloudFront price class (100/200/All) |
149
+
|`HOSTED_ZONE_NAME`|`""`| Route53 hosted zone name for custom domain |
150
+
|`RECORD_NAME`|`""`| Record to create in Route53 (subdomain) |
151
+
|`CERTIFICATE_ARN`|`""`| ARN of ACM certificate for custom domain |
152
+
153
+
### Security Considerations
154
+
155
+
Each deployment scenario offers different security characteristics:
156
+
157
+
1.**CloudFront with public ALB (Default)**:
158
+
- ALB is in public subnets but protected by custom header authentication
159
+
- Only traffic with the proper CloudFront secret header is allowed (except health check paths)
160
+
- CloudFront provides an additional security layer with AWS Shield Standard DDoS protection
161
+
- Best balance of accessibility and security for public services
162
+
163
+
2.**Direct ALB access (No CloudFront)**:
164
+
- ALB directly accessible from internet
165
+
- WAF protection is crucial for this deployment
166
+
- Consider IP-based restrictions if possible
167
+
168
+
3.**Private VPC deployment**:
169
+
- Highest security, no direct internet exposure
170
+
- Requires VPN or Direct Connect for access
171
+
- Consider for sensitive workloads or internal services
172
+
173
+
All scenarios maintain security best practices including:
174
+
- HTTPS for all communications with TLS 1.2+
175
+
- Security groups with principle of least privilege
176
+
- WAF protection against common attacks
177
+
- IAM roles with appropriate permissions
178
+
179
+
### CloudFront Authentication
180
+
181
+
When using CloudFront, a custom security mechanism is implemented:
182
+
183
+
1. CloudFront adds a secret header (`X-CloudFront-Secret`) to all requests sent to the ALB
184
+
2. The ALB has listener rules that verify this header before allowing access
185
+
3. Health check paths are specifically exempted to allow CloudFront origin health checks
186
+
4. The secret is stable across deployments (won't change unless explicitly changed)
187
+
188
+
This provides a robust defense against direct ALB access even if someone discovers your ALB's domain name. The secret is only displayed once after creation in the Terraform outputs and is marked as sensitive.
189
+
42
190
### AWS Services in this Guidance
43
191
44
192
|**AWS Service**|**Role**|**Description**|
@@ -51,10 +199,11 @@ If you are unfamiliar with LiteLLM, it provides a consistent interface to access
51
199
|[Amazon Web Applications Firewall](https://aws.amazon.com/waf/) (WAF) | Core Service | Protect guidance applications from common exploits |
52
200
|[Amazon Elastic Container Registry](http://aws.amazon.com/ecr/) (ECR) | Supporting service | Stores and manages Docker container images for EKS deployments. |
53
201
|[Elastic Load Balancer](https://aws.amazon.com/elasticloadbalancing/) (ALB) | Supporting service | Distributes incoming traffic across multiple targets in the EKS cluster. |
202
+
|[Amazon CloudFront](https://aws.amazon.com/cloudfront/)| Supporting service | Global content delivery network for improved performance and security. |
54
203
|[Amazon Simple Storage Service ](https://aws.amazon.com/s3) (S3) | Supporting service | Provides persistent object storage for Applications logs and other related data. |
55
204
|[Amazon Relational Database Service ](https://aws.amazon.com/rds/) (RDS) | Supporting service | Enables persistence of virtual API keys and other configuration settings provided by LiteLLM. |
56
205
|[Amazon ElastiCache Service (Redis OSS) ](https://aws.amazon.com/elasticache/) (OSS) | Supporting service | Enables multi-tenant distribution of application settings and prompt caching. |
57
-
|[AWS Route 53](https://aws.amazon.com/route53/)| Supporting Service |Routes users to the guidance application via DNS records|
206
+
|[AWS Route 53](https://aws.amazon.com/route53/)| Supporting Service |Optional DNS service for custom domain management |
58
207
|[AWS Identity and Access Management](https://aws.amazon.com/iam/) (IAM) | Supporting service | Manages access to AWS services and resources securely, including ECS or EKS cluster access. |
59
208
|[AWS Certificate Manager](https://aws.amazon.com/certificate-manager/) (ACM) | Security service | Manages SSL/TLS certificates for secure communication within the cluster. |
60
209
|[Amazon CloudWatch](https://aws.amazon.com/cloudwatch/)| Monitoring service | Collects and tracks metrics, logs, and events from ECS, EKS and other AWS resources provisoned in the guidance |
@@ -118,8 +267,8 @@ While this implementation guide provides default configurations, customers are r
118
267
119
268
Customers should regularly review their AWS service usage patterns, adjust configurations as needed, and leverage AWS cost management tools to optimize their spending.
120
269
121
-
We recommend creating a[budget](https://docs.aws.amazon.com/cost-management/latest/userguide/budgets-create.html)
help manage costs. Prices are subject to change and also depend on model provider usage patterns/volume of data. For full details, please refer to the pricing webpage for each AWS service used in this guidance.
124
273
125
274
### Sample Cost tables
@@ -268,6 +417,4 @@ For detailed information about the open source libraries used in this applicatio
268
417
269
418
## Notices
270
419
271
-
Customers are responsible for making their own independent assessment of the information in this Guidance. This Guidance: (a) is for informational purposes only, (b) represents AWS current product offerings and practices, which are subject to change without notice, and (c) does not create any commitments or assurances from AWS and its affiliates, suppliers or licensors. AWS products or services are provided “as is” without warranties, representations, or conditions of any kind, whether express or implied. AWS responsibilities and liabilities to its customers are controlled by AWS agreements, and this Guidance is not part of, nor does it modify, any agreement between AWS and its customers.
272
-
273
-
420
+
Customers are responsible for making their own independent assessment of the information in this Guidance. This Guidance: (a) is for informational purposes only, (b) represents AWS current product offerings and practices, which are subject to change without notice, and (c) does not create any commitments or assurances from AWS and its affiliates, suppliers or licensors. AWS products or services are provided "as is" without warranties, representations, or conditions of any kind, whether express or implied. AWS responsibilities and liabilities to its customers are controlled by AWS agreements, and this Guidance is not part of, nor does it modify, any agreement between AWS and its customers.
0 commit comments