AWS Bun Elysia container
Deploys a Bun Elysia API to AWS.
You can get started by running.
bun create elysia aws-bun-elysiacd aws-bun-elysiabunx sst initNow you can add a service.
new sst.aws.Service("MyService", { cluster, loadBalancer: { ports: [{ listen: "80/http", forward: "3000/http" }], }, dev: { command: "bun dev", },});Start your app locally.
bun sst devThis example lets you upload a file to S3 and then download it.
curl -F file=@elysia.png http://localhost:3000/curl http://localhost:3000/latestFinally, you can deploy it using bun sst deploy --stage production.
const bucket = new sst.aws.Bucket("MyBucket");const vpc = new sst.aws.Vpc("MyVpc");
const cluster = new sst.aws.Cluster("MyCluster", { vpc });new sst.aws.Service("MyService", { cluster, loadBalancer: { ports: [{ listen: "80/http", forward: "3000/http" }], }, dev: { command: "bun dev", }, link: [bucket],});View the full example.