AWS Elastic Beanstalk is the simplest managed-EC2 option for hosting ActiveManage in AWS — autoscaling, load balancing, health checks, integrated logs. This article walks through deploying.
Initial Setup
- In AWS Console, create a new Elastic Beanstalk application.
- Choose platform: PHP (latest supported version).
- Pick environment type: Web server, load-balanced auto-scaling.
- Configure instance type (t3.medium for small, m5.large or above for production).
- Configure RDS in separate stack (don't use the “add database” option — it ties DB lifecycle to environment).
- Set up VPC with private subnet for RDS, public for EB instances.
- Configure environment variables:
$AM_DB_HOST,$AM_STRIPE_KEYetc. - Upload the deployment ZIP and deploy.
CI/CD Integration
For continuous delivery, use GitHub Actions / GitLab CI / Buildkite:
- On merge to main, build the deployment ZIP.
- Upload to S3.
- Create a new EB application version pointing at the S3 ZIP.
- Update the environment to the new version (rolling or all-at-once).
- Watch health checks; auto-rollback on failure.
Configuration Files
Place .ebextensions/ in the deployment ZIP for custom config:
01_packages.config:Install OS packages (ImageMagick, FFmpeg).02_options.config:Tune PHP and Apache settings.03_files.config:Drop in additional config files.04_container_commands.config:Run migrations and cache-clears on deploy.
Worked Examples
- Single-AZ small deployment: t3.medium × 2 instances behind ALB. Cheap, simple.
- Multi-AZ production: m5.large × 3 in different AZs. Auto-scales to 8 in load spikes.
- Blue/green: Two EB environments; swap CNAMEs to release; previous environment retained for rollback.
- Multi-tenant prod: One EB environment serving all tenants behind ALB; per-tenant routing inside the app.
Tip: Use AWS Systems Manager Parameter Store for secrets — don't embed in EB environment variables visible in console. Parameter Store integrates with IAM and supports rotation.