Required AWS Services
To fully run your Spree application on AWS, you will need the following services:Docker Image
You can use the official Docker image (ghcr.io/spree/spree) directly, or build your own from your Rails application’s Dockerfile.
To build and deploy a custom image to AWS ECR via GitHub Actions:
Environment Variables
Store secrets in AWS Secrets Manager and reference them in your task definitions. Non-sensitive configuration goes in theenvironment array directly.
For a full list of available variables, see Environment Variables.
Secrets Manager
Create the following secrets in AWS Secrets Manager:
Optional secrets for email delivery, file storage, and error tracking:
ECS Task Definitions
You will need two ECS task definitions: one for the web service and one for the worker service. Save these as.aws/web-task-definition.json and .aws/worker-task-definition.json in your repository.
Web Service
Worker Service
Production Sizing
The task definitions above are sized for production. Here is a summary and scaling guidance:Auto Scaling
Use ECS Service Auto Scaling to scale the web service based on CPU or memory utilization:After Deployment
Admin Dashboard
Access your admin panel at:db:seed. Change them immediately after first login.
Database Migrations
The GitHub Actions workflow above runs migrations automatically on deploy. To run migrations manually:Next Steps
- Asset Storage — configure S3 for product images and uploads
- Configure CDN — set up CloudFront for asset delivery
- Configure caching — use ElastiCache for application caching
- Set environment variables — SMTP, Sentry, SSL, etc.

