Deploy your Solid Start app with server-side rendering to AWS using Thunder's SolidStart construct. This creates a hybrid architecture: Lambda handles SSR and API routes, S3 hosts static assets, and CloudFront unifies both.
bunx create-solid@latest my-solid-app
cd my-solid-appReference: Solid Start Getting Started
Solid Start uses Nitro for server-side rendering. Set the aws-lambda preset in app.config.ts:
import { defineConfig } from "@solidjs/start/config";
export default defineConfig({
server: {
preset: "aws-lambda",
},
});Reference: Nitro AWS Lambda Preset
bun run buildThis generates:
.output/server/- Lambda handler.output/public/- Static assets for S3
bun add @thunder-so/thunder --developmentCreate stack/prod.ts:
import { Cdk, SolidStart, type SolidStartProps } from "@thunder-so/thunder";
const config: SolidStartProps = {
env: {
account: "123456789012",
region: "us-east-1",
},
application: "myapp",
service: "web",
environment: "prod",
rootDir: ".",
};
new SolidStart(
new Cdk.App(),
`${config.application}-${config.service}-${config.environment}-stack`,
config,
);npx cdk deploy --app "npx tsx stack/prod.ts" --profile defaultconst config: SolidStartProps = {
// ...
domain: "app.example.com",
hostedZoneId: "Z1234567890ABC",
globalCertificateArn:
"arn:aws:acm:us-east-1:123456789012:certificate/abc-123",
regionalCertificateArn:
"arn:aws:acm:us-east-1:123456789012:certificate/def-456",
};serverProps: {
variables: [
{ NODE_ENV: 'production' },
],
secrets: [
{ key: 'DATABASE_URL', resource: 'arn:aws:secretsmanager:us-east-1:123456789012:secret:/myapp/db-abc123' },
],
},serverProps: {
memorySize: 1792,
timeout: 10,
keepWarm: true,
tracing: true,
},- serverless.md - Serverless construct overview
- lambda-basic.md - Lambda construct reference