SST Laravel
- Your Laravel app web and workers on Fargate
- Load balancer your domain, over HTTPS
- Linked resources database, Redis, S3, queues
- Your AWS account private network, IAM roles
SST Laravel makes it easy to deploy secure, reliable, and scalable Laravel applications to AWS using all the best practices. It's an extension of SST, which means you get all the power and features of using a good IaC which runs on top of Pulumi.
Secure defaults, support for auto-scaling, role-based permissions with no access keys hanging around, and deployments with health checks and automatic rollbacks are built in.
Define your web service, queue workers, scheduler, Reverb, and linked AWS resources in code. SST Laravel builds the Docker images and deploys the infrastructure for you.
Your whole setup is one file in your repository, sst.config.ts. This one runs the app with Postgres, Redis, Horizon, and its own domain, scaling between one and three web containers:
const { LaravelService } = await import("@kirschbaum-development/sst-laravel");
const vpc = new sst.aws.Vpc("MyVpc");
const database = new sst.aws.Postgres("MyDatabase", { vpc });
const redis = new sst.aws.Redis("MyRedis", { vpc });
const app = new LaravelService("MyLaravelApp", {
vpc,
link: [database, redis],
web: {
domain: "app.example.com",
scaling: { min: 1, max: 3 },
},
workers: [{ name: "horizon", horizon: true }],
});
return {
url: app.url,
deployment: app.deployment,
};
Linking the database and Redis fills in Laravel's DB_* and REDIS_* variables and gives the containers access to them. The deployment output tells the deploy which revisions to expect. Then deploy:
npx sst-laravel deploy --stage production
The deploy waits until ECS runs the new revision and /up answers, and fails if ECS rolls it back.
Onboard your agent
Start in your Laravel application and paste this into your coding agent:
Fetch and follow the instructions at https://cdn.jsdelivr.net/npm/@kirschbaum-development/sst-laravel/docs/agent-setup.md to set up and deploy this Laravel app with SST Laravel.
The agent installs the package and the SST Laravel skill, checks your machine and AWS access, and looks at what your app needs. If you haven't set up AWS access yet, it walks you through it. Before it changes anything, it shows you a plan: why SST Laravel, what it will create in AWS and the monthly cost, how the deploy works, and how to remove it. It asks what only you can decide, such as whether to add a database and where to keep your environment variables, and waits for your yes. Then it deploys a dev stage, checks the live /up endpoint, and offers to move your deploys to CI. It never prints secret values.
To install or update only the skill:
npx sst-laravel skill:install
It copies the skill from the installed package, so it matches your version. With Laravel Boost set up, it goes to .ai/skills and php artisan boost:update runs. Otherwise it goes to .agents/skills and the folder of each agent set up in the project.