Dify Enterprise Edition Deployment Guide (AWS)
To ensure a smooth deployment of Dify Enterprise Edition, please follow the infrastructure and configuration instructions below.1. Infrastructure Requirements
Required AWS Services:
- S3
- ECR
Supported Authentication Methods:
Dify supports the following two approaches for accessing AWS services:- Access Key Mode (AK/SK): Provide credentials via environment variables
- IRSA Mode: IAM Roles for Service Accounts to enable secure and fine-grained access control
2. Access Key Mode
Step 1: Prepare Credentials
Create an IAM user with only S3 and ECR permissions. Obtain its Access Key and Secret Key.Step 2: Create Kubernetes Secret
Step 3: Update values.yaml
Step 4: Configure Plugin Daemon Database
Step 5: Upgrade Helm Release
3. IRSA Mode
Since Access Keys are strictly controlled in enterprise environments, we recommend using AWS Pod Identity (IRSA) for access.✅ Benefits
- Follows AWS security best practices
- Enables fine-grained control over plugin execution environments
Setup
Step 1: Set up IAM role and Service Account
-
Prerequisites
- An available AWS Region and EKS cluster.
- An existing S3 bucket for Dify file storage.
kubectlis installed and configured locally, and can access the target EKS cluster.- AWS CLI is installed and credentials are configured locally.
🚀Option A: Run One-Click Script
‼️The one-click script is for demo and testing purposes only. Please develop your own script to meet your security requirements. You can obtain this demo script from the Dify FDE team.🔨Option B: Manually setup
- Enable the IAM OIDC provider for your EKS cluster Follow the official AWS documentation to associate your EKS cluster with an OIDC identity provider. This step is required before you can use IAM Roles for Service Accounts (IRSA).
-
Setup IAM Policy
-
Setup Role with policy
-
Setup ServiceAccount with IAM Role
Step 2: Set Environment Variables
Configure environment variables as per the release notes (e.g.,S3_REGION, S3_BUCKET_NAME).
Step 3: Update values.yaml
Step 4: Add Plugin Daemon Database Configuration
Step 5: Upgrade Helm Release
Step 6: Add S3 Permissions to the Custom ServiceAccount for the Application
ServiceAccount name:dify-plugin-connector-sa
./irsa_one_click.sh to create the S3 read/write role, this ARN will appear at the end of the script execution.
Step 7: Restart the Dify Daemon Pod
Notes
- ❌ Redis cluster mode is not supported
- 🌐 EKS nodes must have internet access or be behind a NAT gateway