Deploying Shopware 6.7 on Amazon Web Services (AWS) leverages the platform's latest architectural enhancements, including stricter PHP 8.3 requirements, optimized Messenger queue processing, and a cloud-native filesystem abstraction. This guide outlines a production-ready architecture focusing on scalability, security, and high availability.

Architecture Overview

Shopware 6.7 excels in micro-service friendly environments. Your AWS stack should include:

  • Compute: Amazon ECS (Fargate) or EKS for stateless app servers.
  • Database: Amazon RDS for MySQL/MariaDB with Multi-AZ enabled.
  • Cache: Amazon ElastiCache Redis for sessions, Full-Page Cache, and Message Queues.
  • Storage: Amazon S3 for media files and private assets, decoupling storage from compute.
  • Networking: Application Load Balancer (ALB) with AWS WAF integration.

1. Infrastructure & Permissions

Before configuration, establish an IAM role for your ECS tasks. Shopware 6.7 requires access to S3 and Secrets Manager during runtime for secure credential management and asset storage.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:GetObject",
        "s3:PutObject",
        "s3:ListBucket",
        "s3:DeleteObject"
      ],
      "Resource": [
        "arn:aws:s3:::shopware-media-bucket",
        "arn:aws:s3:::shopware-media-bucket/*"
      ]
    },
    {
      "Effect": "Allow",
      "Action": "secretsmanager:GetSecretValue",
      "Resource": "arn:aws:secretsmanager:region:account:secret:shopware-credentials*"
    }
  ]
}

2. Environment Configuration for Shopware 6.7

Shopware 6.7 introduces robust filesystem configuration via shopware.yaml. Update your deployment variables to target AWS services. Ensure you set APP_ENV=prod and configure the Messenger transport for background jobs.

# shopware/config/packages/shopware.yaml

shopware:
  filesystem:
    private:
      service: 'shopware.filesystem.s3'
      public_url_prefix: ''
    public:
      service: 'shopware.filesystem.s3'
      default_acl: 'private'

# .env.production file
DATABASE_URL=mysql://{{DB_USER}}:{{DB_PASS}}@{{RDS_ENDPOINT}}:3306/shopware?serverVersion=8.0.32&charset=utf8mb4
MESSENGER_TRANSPORT_DSN=redis://{{ELASTICACHE_HOST}}:6379?transport_name=messenger&serializer=symfony.messenger.transport.native_serializer
FILESYSTEM_S3_BUCKET=shopware-media-bucket
FILESYSTEM_S3_REGION=eu-west-1
SENTRY_DSN=https://[email protected]/xxx

Key Changes in 6.7: The FILESYSTEM_S3_* variables are mandatory for S3 integration. Shopware now uses a unified adapter pattern, making cloud storage management consistent across private and public assets. This removes the need for local media directories on compute instances.

3. Database and Cache Setup

Provision an RDS instance compatible with Shopware 6.7 requirements (MySQL 8.0 or MariaDB 10.6+). Enable performance insights and automated backups. For high availability, utilize Multi-AZ replication to minimize downtime during maintenance.

Configure ElastiCache Redis in cluster mode. Shopware 6.7 uses Redis for:

  • Session storage (framework.session.handler_id)
  • Messenger transport
  • Full-page cache backend
  • Dependency injection caching

Ensure your security groups allow ECS tasks to connect to the RDS and Redis subnets on ports 3306 and 6379.

4. Application Deployment via ECS

Use the official Shopware Docker images which support PHP 8.3. Create a Task Definition that respects memory limits required by the newer kernel version. Shopware 6.7 demands adequate resources for efficient compilation and runtime performance.

{
  "family": "shopware-6.7-app",
  "cpu": "512",
  "memory": "1024",
  "networkMode": "awsvpc",
  "requiresCompatibilities": ["FARGATE"],
  "executionRoleArn": "arn:aws:iam::.../ecsTaskExecutionRole",
  "containerDefinitions": [
    {
      "name": "shopware",
      "image": "shopware/commerce:6.7-latest",
      "essential": true,
      "portMappings": [
        { "containerPort": 80, "protocol": "tcp" }
      ],
      "environmentFrom": [
        { "secretArn": "arn:aws:secretsmanager:..." }
      ]
    }
  ]
}

Deploy using Blue/Green strategies. In Shopware 6.7, the bin/console commands are optimized for containerized environments. Use the following deployment sequence in your CI/CD pipeline:

# Clean previous artifacts and install dependencies
bin/composer install --no-dev --optimize-autoloader

# Run migrations and schema updates
bin/console database:migrate --all
bin/console theme:compile --all
bin/console cache:warmup

# Sync media from local build to S3 if using incremental builds
bin/console s3:synchronize-media

5. Ingress and Nginx Configuration

Place an ALB in front of your ECS service. Shopware requires proper header forwarding for SSL termination and IP resolution. Configure a target group health check pointing to /health.

Update your Nginx configuration (if running sidecars or using custom FPM images) to include optimized cache paths compatible with 6.7's routing structure.

location / {
    # Forward headers for ALB compatibility
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    
    # Shopware 6.7 routing
    try_files $uri /index.php?$is_args$args;
}

location ~ \.php$ {
    fastcgi_pass shopware-fpm:9000;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
    
    # OPcache settings for production performance
    fastcgi_param PHP_VALUE "opcache.enable=1";
}

6. Scaling and Maintenance

Shopware 6.7 supports dynamic scaling based on queue depth. Configure Auto Scaling policies to trigger when Amazon SQS or ElastiCache metrics indicate load.

  • App Servers: Scale horizontally based on CPU/Memory utilization.
  • Messenger Workers: Deploy a separate ECS service for workers. Scale this target group based on ApproximateNumberOfMessagesVisible in your queue implementation to handle sales spikes without blocking the storefront.

Conclusion

By combining Shopware 6.7's modern cloud-agnostic architecture with AWS managed services, you achieve a resilient e-commerce platform capable of handling high traffic. The decoupled filesystem, robust Messenger integration, and automated deployment workflows ensure your store remains fast, secure, and scalable. Regularly update your infrastructure as code templates to match Shopware's evolving best practices for 6.7+.