Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions products/sales-agent/best-practices/app-deployment/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@ For easier integration with serverless deployments like AWS Amplify, consider us

These providers offer public endpoints that work seamlessly with AWS Amplify without VPC configuration.

### Configure Redis environment variables

After setting up Redis (ElastiCache or a serverless provider), configure these environment variables in AWS Amplify:

```bash
REDIS_CACHE=true
REDIS_HOST=your-redis-endpoint.cache.amazonaws.com # Or your provider's endpoint
REDIS_PORT=6379
REDIS_PASSWORD=your_redis_password
REDIS_TLS=true # Recommended for production
```

Add these variables in the AWS Amplify Console under "Environment variables" in your app settings, or include them in your `.env.template` file.

## Deploy

- Login to the AWS Amplify Hosting Console.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,17 @@ Key settings to consider:
Enable and start the Redis service:

```bash
sudo systemctl enable redis
sudo systemctl start redis
sudo systemctl enable redis-server
sudo systemctl start redis-server
```

Verify Redis is running:

```bash
# If you configured a password with requirepass
redis-cli -a your_secure_password ping

# If no password is set
redis-cli ping
```

Expand All @@ -75,6 +79,20 @@ Alternatively, you can use managed Redis services such as:

These services provide connection details (host, port, password) that you configure in your `.env` file.

### Configure Redis environment variables

Add these Redis environment variables to your `.env` file:

```bash
REDIS_CACHE=true
REDIS_HOST=127.0.0.1 # For local installation, or your managed service endpoint
REDIS_PORT=6379
REDIS_PASSWORD=your_secure_password # If configured with requirepass
REDIS_TLS=false # Set to true for managed services that require TLS
```

For managed Redis services like Upstash, use the connection details provided by the service (host, port, password, and set `REDIS_TLS=true` for secure connections).

## Build code

- Please follow instructions here to [set up all necessary things and build the code](../../installation.md#setup-app-server)
Expand Down